Adding ESLint config and required dev dependencies
This commit is contained in:
Родитель
6567bffcb9
Коммит
06765f9340
|
@ -0,0 +1,5 @@
|
|||
**/webpack.config.js
|
||||
lib/**
|
||||
runner/dist/**
|
||||
src/testdata/**
|
||||
tests/**
|
|
@ -0,0 +1,32 @@
|
|||
|
||||
{
|
||||
"parser": "@typescript-eslint/parser",
|
||||
"parserOptions": {
|
||||
"project": "./tsconfig.json"
|
||||
},
|
||||
"plugins": ["@typescript-eslint", "filenames", "github", "import", "no-async-foreach"],
|
||||
"extends": [
|
||||
"eslint:recommended",
|
||||
"plugin:@typescript-eslint/recommended",
|
||||
"plugin:@typescript-eslint/recommended-requiring-type-checking",
|
||||
"plugin:github/recommended",
|
||||
"plugin:github/typescript"
|
||||
],
|
||||
"rules": {
|
||||
"filenames/match-regex": ["error", "^[a-z0-9-]+(\\.test)?$"],
|
||||
"import/extensions": "error",
|
||||
"import/no-amd": "error",
|
||||
"import/no-commonjs": "error",
|
||||
"import/no-dynamic-require": "error",
|
||||
"import/no-extraneous-dependencies": ["error", {"devDependencies": false}],
|
||||
"import/no-namespace": "off",
|
||||
"import/no-unresolved": "error",
|
||||
"import/no-webpack-loader-syntax": "error",
|
||||
"no-async-foreach/no-async-foreach": "error",
|
||||
"no-console": "off",
|
||||
"no-sequences": "error",
|
||||
"one-var": ["error", "never"],
|
||||
"sort-imports": ["error", { "allowSeparatedGroups": true }]
|
||||
}
|
||||
}
|
||||
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -46,7 +46,13 @@
|
|||
"@types/node": "^12.0.4",
|
||||
"@types/semver": "^7.2.0",
|
||||
"@types/sinon": "^7.2.0",
|
||||
"@typescript-eslint/parser": "^4.1.0",
|
||||
"ava": "3.8.1",
|
||||
"eslint": "^7.9.0",
|
||||
"eslint-plugin-filenames": "^1.3.2",
|
||||
"eslint-plugin-github": "^4.1.1",
|
||||
"eslint-plugin-import": "^2.22.0",
|
||||
"eslint-plugin-no-async-foreach": "^0.1.1",
|
||||
"micromatch": "4.0.2",
|
||||
"nock": "^12.0.3",
|
||||
"removeNPMAbsolutePaths": "2.0.0",
|
||||
|
@ -55,4 +61,4 @@
|
|||
"tslint-eslint-rules": "^5.4.0",
|
||||
"typescript": "^3.7.5"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче