feat: add lint rules for *.js files

This commit is contained in:
bubkoo
2021-03-23 08:32:55 +08:00
committed by 问崖
parent 82be455923
commit d8ff60b98a
3 changed files with 501 additions and 489 deletions

View File

@ -12,7 +12,7 @@
"lint": "eslint 'src/**/*.{js,ts}?(x)' --fix",
"build": "tsc --outDir ./lib",
"build:watch": "yarn build --w",
"prebuild": "run-s lint clean",
"prebuild": "run-s clean",
"preinstall": "run-s build",
"precommit": "lint-staged"
},

View File

@ -87,6 +87,7 @@ module.exports = {
'promise/catch-or-return': 0,
'@typescript-eslint/no-namespace': 0,
'@typescript-eslint/no-var-requires': 0,
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/no-non-null-assertion': 0,
'@typescript-eslint/no-empty-function': 0,
@ -120,4 +121,13 @@ module.exports = {
'react/destructuring-assignment': 0,
'react/no-access-state-in-setstate': 0,
},
overrides: [
{
files: ['**/*.js'],
rules: {
'no-console': 0,
'global-require': 0,
},
},
],
}

978
yarn.lock

File diff suppressed because it is too large Load Diff