build: mode eslint to a separate file

This commit is contained in:
Mikhail Zolotukhin 2021-09-08 23:54:08 +03:00
parent 53b2f79186
commit 7c5dbbcea5
4 changed files with 43 additions and 42 deletions

38
.eslintrc.json Normal file
View File

@ -0,0 +1,38 @@
{
"root": true,
"ignorePatterns": ["/build"],
"env": {
"es6": true
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "tsconfig.json",
"sourceType": "module"
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"prettier"
],
"plugins": [
"@typescript-eslint",
"eslint-plugin-jsdoc",
"eslint-plugin-prefer-arrow"
],
"rules": {
"curly": "error",
"@typescript-eslint/naming-convention": [
"error",
{
"selector": ["variable"],
"leadingUnderscore": "allow"
}
],
"@typescript-eslint/prefer-for-of": "off",
"one-var": "error",
"max-classes-per-file": "off",
"no-cond-assign": "error"
}
}

3
.eslintrc.json.license Normal file
View File

@ -0,0 +1,3 @@
SPDX-FileCopyrightText: none
SPDX-License-Identifier: MIT

View File

@ -43,6 +43,8 @@ jobs:
env:
VALIDATE_ALL_CODEBASE: false
JAVASCRIPT_DEFAULT_STYLE: prettier
LINTER_RULES_PATH: /
JAVASCRIPT_ES_CONFIG_FILE: .eslintrc.json
VALIDATE_TYPESCRIPT_ES: true
VALIDATE_JAVASCRIPT_ES: true
DEFAULT_BRANCH: master

View File

@ -72,47 +72,5 @@
"prettier": {},
"lint-staged": {
"**/*": "prettier --write --ignore-unknown"
},
"eslintConfig": {
"root": true,
"ignorePatterns": [
"/build"
],
"env": {
"es6": true
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "tsconfig.json",
"sourceType": "module"
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"prettier"
],
"plugins": [
"@typescript-eslint",
"eslint-plugin-jsdoc",
"eslint-plugin-prefer-arrow"
],
"rules": {
"curly": "error",
"@typescript-eslint/naming-convention": [
"error",
{
"selector": [
"variable"
],
"leadingUnderscore": "allow"
}
],
"@typescript-eslint/prefer-for-of": "off",
"one-var": "error",
"max-classes-per-file": "off",
"no-cond-assign": "error"
}
}
}