first commit
This commit is contained in:
1
vant/packages/vant-eslint-config/.pydio
Normal file
1
vant/packages/vant-eslint-config/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
ca258c97-da75-49a4-ab8e-f10fc5bebc29
|
||||
23
vant/packages/vant-eslint-config/README.md
Normal file
23
vant/packages/vant-eslint-config/README.md
Normal file
@@ -0,0 +1,23 @@
|
||||
# Eslint Config of Vant
|
||||
|
||||
## Install
|
||||
|
||||
#### NPM
|
||||
|
||||
```shell
|
||||
npm i @vant/eslint-config -D
|
||||
```
|
||||
|
||||
#### YARN
|
||||
|
||||
```shell
|
||||
yarn add @vant/eslint-config --dev
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
{
|
||||
"extends": ["@vant"]
|
||||
}
|
||||
```
|
||||
86
vant/packages/vant-eslint-config/index.js
Normal file
86
vant/packages/vant-eslint-config/index.js
Normal file
@@ -0,0 +1,86 @@
|
||||
module.exports = {
|
||||
extends: ['airbnb-base', 'plugin:vue/recommended'],
|
||||
|
||||
parserOptions: {
|
||||
parser: '@typescript-eslint/parser',
|
||||
ecmaVersion: 2018,
|
||||
sourceType: 'module',
|
||||
extraFileExtensions: ['.vue'],
|
||||
},
|
||||
|
||||
plugins: ['@typescript-eslint'],
|
||||
|
||||
env: {
|
||||
es6: true,
|
||||
node: true,
|
||||
jest: true,
|
||||
browser: true,
|
||||
},
|
||||
|
||||
globals: {
|
||||
window: false,
|
||||
document: false,
|
||||
navigator: false,
|
||||
},
|
||||
|
||||
rules: {
|
||||
'no-new': 0,
|
||||
'no-shadow': 0,
|
||||
camelcase: 1,
|
||||
'no-bitwise': 0,
|
||||
'func-names': 0,
|
||||
'no-console': 0,
|
||||
'no-plusplus': 0,
|
||||
'arrow-parens': 0,
|
||||
'default-case': 0,
|
||||
'comma-dangle': [
|
||||
'error',
|
||||
{
|
||||
arrays: 'always-multiline',
|
||||
objects: 'always-multiline',
|
||||
imports: 'always-multiline',
|
||||
exports: 'always-multiline',
|
||||
functions: 'never',
|
||||
},
|
||||
],
|
||||
'prefer-template': 0,
|
||||
'consistent-return': 0,
|
||||
'no-param-reassign': 0,
|
||||
'no-nested-ternary': 0,
|
||||
'operator-linebreak': 0,
|
||||
'object-curly-newline': 0,
|
||||
'no-underscore-dangle': 1,
|
||||
'no-unused-expressions': 0,
|
||||
'no-restricted-globals': 0,
|
||||
'function-paren-newline': 0,
|
||||
'class-methods-use-this': 0,
|
||||
'implicit-arrow-linebreak': 0,
|
||||
'space-before-function-paren': 0,
|
||||
'max-len': ['error', { code: 150 }],
|
||||
'prefer-destructuring': ['error', { object: true, array: false }],
|
||||
'import/order': 0,
|
||||
'import/extensions': 0,
|
||||
'import/no-unresolved': 0,
|
||||
'import/prefer-default-export': 0,
|
||||
'import/no-extraneous-dependencies': 0,
|
||||
'vue/no-v-html': 0,
|
||||
'vue/attributes-order': 0,
|
||||
'vue/require-v-for-key': 0,
|
||||
'vue/require-default-prop': 0,
|
||||
'vue/no-unused-components': 0,
|
||||
'vue/max-attributes-per-line': 0,
|
||||
'vue/singleline-html-element-content-newline': 0,
|
||||
'vue/name-property-casing': ['error', 'kebab-case'],
|
||||
'vue/component-name-in-template-casing': ['error', 'kebab-case'],
|
||||
'vue/html-closing-bracket-newline': 2,
|
||||
'vue/html-self-closing': [
|
||||
'error',
|
||||
{
|
||||
html: {
|
||||
void: 'always',
|
||||
},
|
||||
},
|
||||
],
|
||||
'@typescript-eslint/no-unused-vars': ['error'],
|
||||
},
|
||||
};
|
||||
24
vant/packages/vant-eslint-config/package.json
Normal file
24
vant/packages/vant-eslint-config/package.json
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"name": "@vant/eslint-config",
|
||||
"version": "2.0.0",
|
||||
"description": "eslint config of vant",
|
||||
"main": "index.js",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"license": "MIT",
|
||||
"repository": "https://github.com/youzan/vant/tree/dev/packages/vant-eslint-config",
|
||||
"peerDependencies": {
|
||||
"eslint": "^6.8.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@typescript-eslint/eslint-plugin": "^2.16.0",
|
||||
"@typescript-eslint/parser": "^2.16.0",
|
||||
"eslint-config-airbnb-base": "^14.0.0",
|
||||
"eslint-plugin-import": "^2.20.0",
|
||||
"eslint-plugin-vue": "^6.1.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "^6.8.0"
|
||||
}
|
||||
}
|
||||
1349
vant/packages/vant-eslint-config/yarn.lock
Normal file
1349
vant/packages/vant-eslint-config/yarn.lock
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user