Compare commits
47 Commits
Author | SHA1 | Date | |
---|---|---|---|
2b9c6380f0 | |||
ee0e9ca2e4 | |||
84a6f6a0f1 | |||
27c334ef9b | |||
14cecabc10 | |||
10507bf4d5 | |||
7f69fc6b1e | |||
802224efd3 | |||
65cf95c441 | |||
2c62da8dec | |||
e1d7895283 | |||
75912b5777 | |||
adf39edc06 | |||
43a293985c
|
|||
fd0218c01e
|
|||
a3a2934e43
|
|||
28516614a3
|
|||
1b9319f0f7
|
|||
c94f480062
|
|||
7398379ef8
|
|||
3d805a1417
|
|||
4aa0bc667b | |||
2bdf5c8799
|
|||
bbc0fca985
|
|||
f12fa08c45
|
|||
4431cd50b1
|
|||
c2ad7f211e
|
|||
e214aeb8a5
|
|||
3f3d4da18b
|
|||
1380e38397 | |||
5ab5dadfc1 | |||
838f58e1cd
|
|||
a03e6513cb
|
|||
78586ee73c
|
|||
9ba18706cd
|
|||
4925f485ea
|
|||
46d05009cc
|
|||
582698ebfa
|
|||
5d9c8c8b4e
|
|||
3c92284822
|
|||
09caa0dcba
|
|||
a40468c437
|
|||
694ac9c74d
|
|||
9ff6063149
|
|||
d604a6f373
|
|||
3dd60105f6
|
|||
e3f0415e2b
|
@ -12,9 +12,7 @@ tab_width = 4
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.json]
|
||||
indent_size = 2
|
||||
indent_style = space
|
||||
|
||||
[*.yml]
|
||||
indent_size = 2
|
||||
indent_style = space
|
||||
|
19
.github/workflows/publish.yml
vendored
Normal file
19
.github/workflows/publish.yml
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
name: Publish
|
||||
|
||||
on:
|
||||
create:
|
||||
tags:
|
||||
- v*
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: '13.x'
|
||||
- run: npm install
|
||||
- run: npm run build
|
||||
- run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_AUTH_TOKEN }}" > ~/.npmrc
|
||||
- run: npm publish
|
8
.gitignore
vendored
8
.gitignore
vendored
@ -198,9 +198,5 @@ $RECYCLE.BIN/
|
||||
### Project ###
|
||||
|
||||
# Resulting code
|
||||
/_tslib-*.js
|
||||
/default-*.js
|
||||
/javascript.js
|
||||
/typescript.js
|
||||
/vue-javascript.js
|
||||
/vue-typescript.js
|
||||
/*.js
|
||||
|
||||
|
@ -1,19 +0,0 @@
|
||||
image: "node:latest"
|
||||
|
||||
cache:
|
||||
paths:
|
||||
- node_modules/
|
||||
|
||||
job-publish:
|
||||
only:
|
||||
- tags
|
||||
|
||||
before_script:
|
||||
- curl -o- -L https://yarnpkg.com/install.sh | bash
|
||||
- export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"
|
||||
|
||||
script:
|
||||
- yarn install
|
||||
- yarn run build
|
||||
- echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc
|
||||
- npm publish
|
@ -203,7 +203,7 @@ src/
|
||||
# Configuration file
|
||||
.editorconfig
|
||||
.eslintrc.json
|
||||
.github/
|
||||
.gitignore
|
||||
.gitlab-ci.yml
|
||||
rollup.config.js
|
||||
tsconfig.json
|
||||
|
72
README.md
72
README.md
@ -1 +1,71 @@
|
||||
# Personal ESLint configuration
|
||||
<p align="center">
|
||||
<img height="60px" width="60px" src="https://eslint.org/assets/img/favicon.512x512.png" />
|
||||
<h1 align="center">Personal ESLint configuration</h1>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://www.npmjs.com/package/@valentineus/eslint-config">
|
||||
<img src="https://flat.badgen.net/npm/v/@valentineus/eslint-config" />
|
||||
</a>
|
||||
<a href="https://www.npmjs.com/package/@valentineus/eslint-config">
|
||||
<img src="https://flat.badgen.net/packagephobia/install/@valentineus/eslint-config" />
|
||||
</a>
|
||||
<a href="https://github.com/valentineus/eslint-config">
|
||||
<img src="https://flat.badgen.net/github/last-commit/valentineus/eslint-config" />
|
||||
</a>
|
||||
</p>
|
||||
|
||||
## Configurations
|
||||
|
||||
* `javascript`
|
||||
* `typescript`
|
||||
* `vue-javascript`
|
||||
* `vue-typescript`
|
||||
|
||||
## Example
|
||||
|
||||
* Install dependencies:
|
||||
|
||||
```shell script
|
||||
npm install --save-dev @typescript-eslint/eslint-plugin @typescript-eslint/parser \
|
||||
@valentineus/eslint-config eslint eslint-plugin-eslint-comments \
|
||||
eslint-plugin-import eslint-plugin-security eslint-plugin-sonarjs \
|
||||
eslint-plugin-unicorn eslint-plugin-vue
|
||||
|
||||
# or
|
||||
yarn add --dev @typescript-eslint/eslint-plugin @typescript-eslint/parser \
|
||||
@valentineus/eslint-config eslint eslint-plugin-eslint-comments \
|
||||
eslint-plugin-import eslint-plugin-security eslint-plugin-sonarjs \
|
||||
eslint-plugin-unicorn eslint-plugin-vue
|
||||
```
|
||||
|
||||
* Create config file:
|
||||
|
||||
```json
|
||||
{
|
||||
"env": {
|
||||
"browser": true,
|
||||
"es6": true
|
||||
},
|
||||
"extends": [
|
||||
"@valentineus/eslint-config/vue-typescript"
|
||||
],
|
||||
"globals": {
|
||||
"Atomics": "readonly",
|
||||
"SharedArrayBuffer": "readonly"
|
||||
},
|
||||
"parserOptions": {
|
||||
"createDefaultProgram": true,
|
||||
"ecmaVersion": 2020,
|
||||
"project": "tsconfig.json",
|
||||
"sourceType": "module",
|
||||
"tsconfigRootDir": "."
|
||||
},
|
||||
"rules": {}
|
||||
}
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
[Apache-2.0](LICENSE.txt).
|
||||
Copyright (c) [Valentin Popov](mailto:info@valentineus.link).
|
||||
|
106
ROADMAP.md
106
ROADMAP.md
@ -13,7 +13,6 @@
|
||||
- [ ] "block-scoped-var"
|
||||
- [ ] "block-spacing"
|
||||
- [X] "brace-style"
|
||||
- [X] "callback-return"
|
||||
- [X] "camelcase"
|
||||
- [ ] "capitalized-comments"
|
||||
- [X] "class-methods-use-this"
|
||||
@ -42,10 +41,8 @@
|
||||
- [ ] "function-paren-newline"
|
||||
- [ ] "generator-star-spacing"
|
||||
- [ ] "getter-return"
|
||||
- [ ] "global-require"
|
||||
- [ ] "grouped-accessor-pairs"
|
||||
- [ ] "guard-for-in"
|
||||
- [X] "handle-callback-err"
|
||||
- [ ] "id-blacklist"
|
||||
- [X] "id-length"
|
||||
- [ ] "id-match"
|
||||
@ -138,10 +135,10 @@
|
||||
- [X] "no-lone-blocks"
|
||||
- [ ] "no-lonely-if"
|
||||
- [ ] "no-loop-func"
|
||||
- [ ] "no-loss-of-precision"
|
||||
- [X] "no-magic-numbers"
|
||||
- [ ] "no-misleading-character-class"
|
||||
- [ ] "no-mixed-operators"
|
||||
- [ ] "no-mixed-requires"
|
||||
- [X] "no-mixed-spaces-and-tabs"
|
||||
- [ ] "no-multi-assign"
|
||||
- [X] "no-multi-spaces"
|
||||
@ -154,17 +151,13 @@
|
||||
- [ ] "no-new"
|
||||
- [X] "no-new-func"
|
||||
- [ ] "no-new-object"
|
||||
- [X] "no-new-require"
|
||||
- [ ] "no-new-symbol"
|
||||
- [X] "no-new-wrappers"
|
||||
- [ ] "no-obj-calls"
|
||||
- [ ] "no-octal"
|
||||
- [X] "no-octal-escape"
|
||||
- [ ] "no-param-reassign"
|
||||
- [X] "no-path-concat"
|
||||
- [ ] "no-plusplus"
|
||||
- [X] "no-process-env"
|
||||
- [ ] "no-process-exit"
|
||||
- [X] "no-proto"
|
||||
- [ ] "no-prototype-builtins"
|
||||
- [ ] "no-redeclare"
|
||||
@ -172,7 +165,6 @@
|
||||
- [ ] "no-restricted-exports"
|
||||
- [ ] "no-restricted-globals"
|
||||
- [ ] "no-restricted-imports"
|
||||
- [ ] "no-restricted-modules"
|
||||
- [X] "no-restricted-properties"
|
||||
- [ ] "no-restricted-syntax"
|
||||
- [ ] "no-return-assign"
|
||||
@ -186,7 +178,6 @@
|
||||
- [ ] "no-shadow-restricted-names"
|
||||
- [X] "no-spaced-func"
|
||||
- [ ] "no-sparse-arrays"
|
||||
- [ ] "no-sync"
|
||||
- [X] "no-tabs"
|
||||
- [ ] "no-template-curly-in-string"
|
||||
- [X] "no-ternary"
|
||||
@ -291,6 +282,7 @@
|
||||
- [X] "no-unused-disable"
|
||||
- [X] "no-unused-enable"
|
||||
- [X] "no-use"
|
||||
- [ ] "require-description"
|
||||
|
||||
## Import
|
||||
|
||||
@ -316,6 +308,7 @@
|
||||
- [ ] "no-dynamic-require"
|
||||
- [ ] "no-extraneous-dependencies"
|
||||
- [ ] "no-internal-modules"
|
||||
- [ ] "no-loss-of-precision"
|
||||
- [ ] "no-mutable-exports"
|
||||
- [ ] "no-named-as-default"
|
||||
- [ ] "no-named-as-default-member"
|
||||
@ -331,7 +324,7 @@
|
||||
- [ ] "no-unused-modules"
|
||||
- [ ] "no-useless-path-segments"
|
||||
- [X] "no-webpack-loader-syntax"
|
||||
- [ ] "order"
|
||||
- [X] "order"
|
||||
- [ ] "prefer-default-export"
|
||||
- [ ] "unambiguous"
|
||||
|
||||
@ -353,31 +346,31 @@
|
||||
|
||||
## SonarJS
|
||||
|
||||
- [ ] "cognitive-complexity"
|
||||
- [ ] "max-switch-cases"
|
||||
- [ ] "no-all-duplicated-branches"
|
||||
- [ ] "no-collapsible-if"
|
||||
- [ ] "no-collection-size-mischeck"
|
||||
- [ ] "no-duplicate-string"
|
||||
- [ ] "no-duplicated-branches"
|
||||
- [ ] "no-element-overwrite"
|
||||
- [ ] "no-extra-arguments"
|
||||
- [ ] "no-identical-conditions"
|
||||
- [ ] "no-identical-expressions"
|
||||
- [ ] "no-identical-functions"
|
||||
- [ ] "no-inverted-boolean-check"
|
||||
- [ ] "no-one-iteration-loop"
|
||||
- [ ] "no-redundant-boolean"
|
||||
- [ ] "no-redundant-jump"
|
||||
- [ ] "no-same-line-conditional"
|
||||
- [ ] "no-small-switch"
|
||||
- [ ] "no-unused-collection"
|
||||
- [ ] "no-use-of-empty-return-value"
|
||||
- [ ] "no-useless-catch"
|
||||
- [ ] "prefer-immediate-return"
|
||||
- [ ] "prefer-object-literal"
|
||||
- [ ] "prefer-single-boolean-return"
|
||||
- [ ] "prefer-while"
|
||||
- [X] "cognitive-complexity"
|
||||
- [X] "max-switch-cases"
|
||||
- [X] "no-all-duplicated-branches"
|
||||
- [X] "no-collapsible-if"
|
||||
- [X] "no-collection-size-mischeck"
|
||||
- [X] "no-duplicate-string"
|
||||
- [X] "no-duplicated-branches"
|
||||
- [X] "no-element-overwrite"
|
||||
- [X] "no-extra-arguments"
|
||||
- [X] "no-identical-conditions"
|
||||
- [X] "no-identical-expressions"
|
||||
- [X] "no-identical-functions"
|
||||
- [X] "no-inverted-boolean-check"
|
||||
- [X] "no-one-iteration-loop"
|
||||
- [X] "no-redundant-boolean"
|
||||
- [X] "no-redundant-jump"
|
||||
- [X] "no-same-line-conditional"
|
||||
- [X] "no-small-switch"
|
||||
- [X] "no-unused-collection"
|
||||
- [X] "no-use-of-empty-return-value"
|
||||
- [X] "no-useless-catch"
|
||||
- [X] "prefer-immediate-return"
|
||||
- [X] "prefer-object-literal"
|
||||
- [X] "prefer-single-boolean-return"
|
||||
- [X] "prefer-while"
|
||||
|
||||
## TypeScript
|
||||
|
||||
@ -385,27 +378,31 @@
|
||||
- [ ] "array-type"
|
||||
- [X] "await-thenable"
|
||||
- [ ] "ban-ts-comment"
|
||||
- [ ] "ban-ts-ignore"
|
||||
- [ ] "ban-tslint-comment"
|
||||
- [ ] "ban-types"
|
||||
- [ ] "brace-style"
|
||||
- [ ] "camelcase"
|
||||
- [ ] "class-name-casing"
|
||||
- [X] "class-literal-property-style"
|
||||
- [X] "comma-spacing"
|
||||
- [ ] "consistent-type-assertions"
|
||||
- [ ] "consistent-type-definitions"
|
||||
- [ ] "default-param-last"
|
||||
- [ ] "dot-notation"
|
||||
- [X] "explicit-function-return-type"
|
||||
- [X] "explicit-member-accessibility"
|
||||
- [ ] "explicit-module-boundary-types"
|
||||
- [ ] "func-call-spacing"
|
||||
- [ ] "generic-type-naming"
|
||||
- [X] "indent"
|
||||
- [X] "interface-name-prefix"
|
||||
- [ ] "init-declarations"
|
||||
- [ ] "keyword-spacing"
|
||||
- [ ] "lines-between-class-members"
|
||||
- [ ] "member-delimiter-style"
|
||||
- [ ] "member-naming"
|
||||
- [ ] "member-ordering"
|
||||
- [X] "method-signature-style"
|
||||
- [ ] "naming-convention"
|
||||
- [ ] "no-array-constructor"
|
||||
- [X] "no-base-to-string"
|
||||
- [ ] "no-confusing-non-null-assertion"
|
||||
- [ ] "no-dupe-class-members"
|
||||
- [ ] "no-dynamic-delete"
|
||||
- [ ] "no-empty-function"
|
||||
@ -419,6 +416,8 @@
|
||||
- [ ] "no-for-in-array"
|
||||
- [X] "no-implied-eval"
|
||||
- [X] "no-inferrable-types"
|
||||
- [ ] "no-invalid-this"
|
||||
- [ ] "no-invalid-void-type"
|
||||
- [X] "no-magic-numbers"
|
||||
- [ ] "no-misused-new"
|
||||
- [X] "no-misused-promises"
|
||||
@ -431,11 +430,14 @@
|
||||
- [ ] "no-throw-literal"
|
||||
- [X] "no-type-alias"
|
||||
- [ ] "no-unnecessary-boolean-literal-compare"
|
||||
- [ ] "no-unnecessary-condition"
|
||||
- [X] "no-unnecessary-condition"
|
||||
- [ ] "no-unnecessary-qualifier"
|
||||
- [ ] "no-unnecessary-type-arguments"
|
||||
- [ ] "no-unnecessary-type-assertion"
|
||||
- [X] "no-untyped-public-signature"
|
||||
- [X] "no-unnecessary-type-assertion"
|
||||
- [ ] "no-unsafe-assignment"
|
||||
- [X] "no-unsafe-call"
|
||||
- [X] "no-unsafe-member-access"
|
||||
- [X] "no-unsafe-return"
|
||||
- [ ] "no-unused-expressions"
|
||||
- [X] "no-unused-vars"
|
||||
- [X] "no-unused-vars-experimental"
|
||||
@ -450,8 +452,11 @@
|
||||
- [ ] "prefer-nullish-coalescing"
|
||||
- [ ] "prefer-optional-chain"
|
||||
- [ ] "prefer-readonly"
|
||||
- [X] "prefer-readonly-parameter-types"
|
||||
- [ ] "prefer-reduce-type-parameter"
|
||||
- [ ] "prefer-regexp-exec"
|
||||
- [ ] "prefer-string-starts-ends-with"
|
||||
- [ ] "prefer-ts-expect-error"
|
||||
- [ ] "promise-function-async"
|
||||
- [X] "quotes"
|
||||
- [ ] "require-array-sort-compare"
|
||||
@ -480,7 +485,7 @@
|
||||
- [ ] "expiring-todo-comments"
|
||||
- [ ] "explicit-length-check"
|
||||
- [X] "filename-case"
|
||||
- [ ] "import-index"
|
||||
- [X] "import-index"
|
||||
- [ ] "new-for-builtins"
|
||||
- [ ] "no-abusive-eslint-disable"
|
||||
- [ ] "no-array-instanceof"
|
||||
@ -491,13 +496,17 @@
|
||||
- [ ] "no-keyword-prefix"
|
||||
- [ ] "no-nested-ternary"
|
||||
- [ ] "no-new-buffer"
|
||||
- [ ] "no-null"
|
||||
- [ ] "no-process-exit"
|
||||
- [ ] "no-reduce"
|
||||
- [ ] "no-unreadable-array-destructuring"
|
||||
- [ ] "no-unsafe-regex"
|
||||
- [ ] "no-unused-properties"
|
||||
- [ ] "no-useless-undefined"
|
||||
- [ ] "no-zero-fractions"
|
||||
- [ ] "number-literal-case"
|
||||
- [ ] "prefer-add-event-listener"
|
||||
- [ ] "prefer-array-find"
|
||||
- [ ] "prefer-dataset"
|
||||
- [ ] "prefer-event-key"
|
||||
- [ ] "prefer-exponentiation-operator"
|
||||
@ -507,9 +516,12 @@
|
||||
- [ ] "prefer-negative-index"
|
||||
- [ ] "prefer-node-append"
|
||||
- [ ] "prefer-node-remove"
|
||||
- [X] "prefer-number-properties"
|
||||
- [ ] "prefer-optional-catch-binding"
|
||||
- [ ] "prefer-query-selector"
|
||||
- [ ] "prefer-reflect-apply"
|
||||
- [ ] "prefer-replace-all"
|
||||
- [X] "prefer-set-has"
|
||||
- [ ] "prefer-spread"
|
||||
- [ ] "prefer-starts-ends-with"
|
||||
- [ ] "prefer-string-slice"
|
||||
@ -517,7 +529,7 @@
|
||||
- [ ] "prefer-trim-start-end"
|
||||
- [ ] "prefer-type-error"
|
||||
- [X] "prevent-abbreviations"
|
||||
- [ ] "regex-shorthand"
|
||||
- [ ] "string-content"
|
||||
- [ ] "throw-new-error"
|
||||
|
||||
## Vue
|
||||
@ -561,7 +573,7 @@
|
||||
- [ ] "no-duplicate-attributes"
|
||||
- [ ] "no-empty-pattern"
|
||||
- [ ] "no-irregular-whitespace"
|
||||
- [ ] "no-multi-spaces"
|
||||
- [X] "no-multi-spaces"
|
||||
- [ ] "no-parsing-error"
|
||||
- [ ] "no-reserved-component-names"
|
||||
- [ ] "no-reserved-keys"
|
||||
|
2233
package-lock.json
generated
Normal file
2233
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
43
package.json
43
package.json
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@valentineus/eslint-config",
|
||||
"version": "0.0.11",
|
||||
"version": "0.0.16",
|
||||
"description": "Personal ESLint configuration",
|
||||
"main": "index.js",
|
||||
"repository": "git@code.valentineus.link:eslint-config.git",
|
||||
@ -11,32 +11,33 @@
|
||||
"build": "rollup --config rollup.config.js"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@rollup/plugin-json": "^4.0.2",
|
||||
"@rollup/plugin-typescript": "^3.0.0",
|
||||
"@typescript-eslint/eslint-plugin": "^2.20.0",
|
||||
"@typescript-eslint/parser": "^2.20.0",
|
||||
"eslint": "^6.8.0",
|
||||
"eslint-plugin-eslint-comments": "^3.1.2",
|
||||
"eslint-plugin-import": "^2.20.1",
|
||||
"@rollup/plugin-json": "^4.1.0",
|
||||
"@rollup/plugin-typescript": "^4.1.2",
|
||||
"@types/node": "^14.0.13",
|
||||
"@typescript-eslint/eslint-plugin": "^3.3.0",
|
||||
"@typescript-eslint/parser": "^3.3.0",
|
||||
"eslint": "^7.2.0",
|
||||
"eslint-plugin-eslint-comments": "^3.2.0",
|
||||
"eslint-plugin-import": "^2.21.2",
|
||||
"eslint-plugin-security": "^1.4.0",
|
||||
"eslint-plugin-sonarjs": "^0.5.0",
|
||||
"eslint-plugin-unicorn": "^16.1.1",
|
||||
"eslint-plugin-vue": "^6.2.1",
|
||||
"rollup": "^1.31.1",
|
||||
"rollup-plugin-terser": "^5.2.0",
|
||||
"tslib": "^1.10.0",
|
||||
"typescript": "^3.7.5"
|
||||
"eslint-plugin-unicorn": "^20.1.0",
|
||||
"eslint-plugin-vue": "^6.2.2",
|
||||
"rollup": "^2.17.0",
|
||||
"rollup-plugin-terser": "^6.1.0",
|
||||
"tslib": "^2.0.0",
|
||||
"typescript": "^3.9.5"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@typescript-eslint/eslint-plugin": "^2.19.0",
|
||||
"@typescript-eslint/parser": "^2.19.0",
|
||||
"eslint": "^6.8.0",
|
||||
"eslint-plugin-eslint-comments": "^3.1.2",
|
||||
"eslint-plugin-import": "^2.20.1",
|
||||
"@typescript-eslint/eslint-plugin": "^3.3.0",
|
||||
"@typescript-eslint/parser": "^3.3.0",
|
||||
"eslint": "^7.2.0",
|
||||
"eslint-plugin-eslint-comments": "^3.2.0",
|
||||
"eslint-plugin-import": "^2.21.2",
|
||||
"eslint-plugin-security": "^1.4.0",
|
||||
"eslint-plugin-sonarjs": "^0.5.0",
|
||||
"eslint-plugin-unicorn": "^16.1.1",
|
||||
"eslint-plugin-vue": "^6.1.2"
|
||||
"eslint-plugin-unicorn": "^20.1.0",
|
||||
"eslint-plugin-vue": "^6.2.2"
|
||||
},
|
||||
"dependencies": {}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { terser } from "rollup-plugin-terser";
|
||||
import json from "@rollup/plugin-json";
|
||||
import typescript from "@rollup/plugin-typescript";
|
||||
import { terser } from "rollup-plugin-terser";
|
||||
|
||||
module.exports = {
|
||||
input: {
|
||||
@ -25,7 +25,6 @@ module.exports = {
|
||||
output: {
|
||||
comments: false,
|
||||
},
|
||||
sourcemap: false,
|
||||
}),
|
||||
],
|
||||
};
|
||||
|
@ -1,6 +1,6 @@
|
||||
import rComments from "./rules/eslint-comments/default.json";
|
||||
import rDefault from "./rules/javascript/default.json";
|
||||
import rImport from "./rules/import/default.json";
|
||||
import rDefault from "./rules/javascript/default.json";
|
||||
import rSecurity from "./rules/security/default.json";
|
||||
import rSonarJS from "./rules/sonarjs/default.json";
|
||||
import rUnicorn from "./rules/unicorn/default.json";
|
||||
|
@ -13,5 +13,30 @@
|
||||
],
|
||||
"import/no-webpack-loader-syntax": [
|
||||
"error"
|
||||
],
|
||||
"import/order": [
|
||||
"error",
|
||||
{
|
||||
"alphabetize": {
|
||||
"caseInsensitive": false,
|
||||
"order": "asc"
|
||||
},
|
||||
"groups": [
|
||||
[
|
||||
"builtin",
|
||||
"external"
|
||||
],
|
||||
[
|
||||
"internal",
|
||||
"parent",
|
||||
"sibling"
|
||||
],
|
||||
[
|
||||
"index"
|
||||
],
|
||||
"unknown"
|
||||
],
|
||||
"newlines-between": "always"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -2,7 +2,8 @@
|
||||
"array-callback-return": [
|
||||
"error",
|
||||
{
|
||||
"allowImplicit": false
|
||||
"allowImplicit": false,
|
||||
"checkForEach": true
|
||||
}
|
||||
],
|
||||
"arrow-parens": [
|
||||
@ -23,9 +24,6 @@
|
||||
"allowSingleLine": false
|
||||
}
|
||||
],
|
||||
"callback-return": [
|
||||
"warn"
|
||||
],
|
||||
"camelcase": [
|
||||
"error",
|
||||
{
|
||||
@ -53,10 +51,7 @@
|
||||
],
|
||||
"comma-style": [
|
||||
"error",
|
||||
"last",
|
||||
{
|
||||
"exceptions": {}
|
||||
}
|
||||
"last"
|
||||
],
|
||||
"curly": [
|
||||
"error",
|
||||
@ -80,9 +75,6 @@
|
||||
"error",
|
||||
"consistent"
|
||||
],
|
||||
"handle-callback-err": [
|
||||
"error"
|
||||
],
|
||||
"id-length": [
|
||||
"warn",
|
||||
{
|
||||
@ -114,7 +106,7 @@
|
||||
"VariableDeclarator": 1,
|
||||
"flatTernaryExpressions": true,
|
||||
"ignoreComments": false,
|
||||
"ignoredNodes": [],
|
||||
"offsetTernaryExpressions": true,
|
||||
"outerIIFEBody": 1
|
||||
}
|
||||
],
|
||||
@ -177,6 +169,7 @@
|
||||
"code": 180,
|
||||
"comments": 72,
|
||||
"ignoreComments": false,
|
||||
"ignorePattern": "eslint*",
|
||||
"ignoreRegExpLiterals": false,
|
||||
"ignoreStrings": true,
|
||||
"ignoreTemplateLiterals": true,
|
||||
@ -329,9 +322,6 @@
|
||||
"no-new-func": [
|
||||
"error"
|
||||
],
|
||||
"no-new-require": [
|
||||
"error"
|
||||
],
|
||||
"no-new-wrappers": [
|
||||
"error"
|
||||
],
|
||||
@ -344,12 +334,6 @@
|
||||
"props": true
|
||||
}
|
||||
],
|
||||
"no-path-concat": [
|
||||
"error"
|
||||
],
|
||||
"no-process-env": [
|
||||
"off"
|
||||
],
|
||||
"no-proto": [
|
||||
"error"
|
||||
],
|
||||
@ -468,9 +452,22 @@
|
||||
"object-curly-newline": [
|
||||
"error",
|
||||
{
|
||||
"consistent": true,
|
||||
"minProperties": 5,
|
||||
"multiline": true
|
||||
"ExportDeclaration": {
|
||||
"consistent": true,
|
||||
"minProperties": 1,
|
||||
"multiline": true
|
||||
},
|
||||
"ImportDeclaration": "never",
|
||||
"ObjectExpression": {
|
||||
"consistent": true,
|
||||
"minProperties": 1,
|
||||
"multiline": true
|
||||
},
|
||||
"ObjectPattern": {
|
||||
"consistent": true,
|
||||
"minProperties": 1,
|
||||
"multiline": true
|
||||
}
|
||||
}
|
||||
],
|
||||
"object-curly-spacing": [
|
||||
|
@ -1 +1,80 @@
|
||||
{}
|
||||
{
|
||||
"sonarjs/cognitive-complexity": [
|
||||
"warn",
|
||||
25
|
||||
],
|
||||
"sonarjs/max-switch-cases": [
|
||||
"warn",
|
||||
30
|
||||
],
|
||||
"sonarjs/no-all-duplicated-branches": [
|
||||
"error"
|
||||
],
|
||||
"sonarjs/no-collapsible-if": [
|
||||
"error"
|
||||
],
|
||||
"sonarjs/no-collection-size-mischeck": [
|
||||
"error"
|
||||
],
|
||||
"sonarjs/no-duplicate-string": [
|
||||
"warn",
|
||||
5
|
||||
],
|
||||
"sonarjs/no-duplicated-branches": [
|
||||
"error"
|
||||
],
|
||||
"sonarjs/no-element-overwrite": [
|
||||
"error"
|
||||
],
|
||||
"sonarjs/no-extra-arguments": [
|
||||
"error"
|
||||
],
|
||||
"sonarjs/no-identical-conditions": [
|
||||
"error"
|
||||
],
|
||||
"sonarjs/no-identical-expressions": [
|
||||
"error"
|
||||
],
|
||||
"sonarjs/no-identical-functions": [
|
||||
"error"
|
||||
],
|
||||
"sonarjs/no-inverted-boolean-check": [
|
||||
"error"
|
||||
],
|
||||
"sonarjs/no-one-iteration-loop": [
|
||||
"error"
|
||||
],
|
||||
"sonarjs/no-redundant-boolean": [
|
||||
"error"
|
||||
],
|
||||
"sonarjs/no-redundant-jump": [
|
||||
"error"
|
||||
],
|
||||
"sonarjs/no-same-line-conditional": [
|
||||
"error"
|
||||
],
|
||||
"sonarjs/no-small-switch": [
|
||||
"error"
|
||||
],
|
||||
"sonarjs/no-unused-collection": [
|
||||
"error"
|
||||
],
|
||||
"sonarjs/no-use-of-empty-return-value": [
|
||||
"error"
|
||||
],
|
||||
"sonarjs/no-useless-catch": [
|
||||
"warn"
|
||||
],
|
||||
"sonarjs/prefer-immediate-return": [
|
||||
"error"
|
||||
],
|
||||
"sonarjs/prefer-object-literal": [
|
||||
"error"
|
||||
],
|
||||
"sonarjs/prefer-single-boolean-return": [
|
||||
"error"
|
||||
],
|
||||
"sonarjs/prefer-while": [
|
||||
"error"
|
||||
]
|
||||
}
|
||||
|
@ -2,6 +2,10 @@
|
||||
"@typescript-eslint/await-thenable": [
|
||||
"error"
|
||||
],
|
||||
"@typescript-eslint/class-literal-property-style": [
|
||||
"error",
|
||||
"getters"
|
||||
],
|
||||
"@typescript-eslint/comma-spacing": [
|
||||
"error",
|
||||
{
|
||||
@ -12,6 +16,7 @@
|
||||
"@typescript-eslint/explicit-function-return-type": [
|
||||
"error",
|
||||
{
|
||||
"allowConciseArrowFunctionExpressionsStartingWithVoid": false,
|
||||
"allowExpressions": false,
|
||||
"allowHigherOrderFunctions": false,
|
||||
"allowTypedFunctionExpressions": false
|
||||
@ -57,12 +62,12 @@
|
||||
"outerIIFEBody": 1
|
||||
}
|
||||
],
|
||||
"@typescript-eslint/interface-name-prefix": [
|
||||
"@typescript-eslint/method-signature-style": [
|
||||
"error",
|
||||
{
|
||||
"allowUnderscorePrefix": false,
|
||||
"prefixWithI": "always"
|
||||
}
|
||||
"property"
|
||||
],
|
||||
"@typescript-eslint/no-base-to-string": [
|
||||
"error"
|
||||
],
|
||||
"@typescript-eslint/no-empty-interface": [
|
||||
"warn",
|
||||
@ -73,7 +78,7 @@
|
||||
"@typescript-eslint/no-explicit-any": [
|
||||
"warn",
|
||||
{
|
||||
"fixToUnknown": false,
|
||||
"fixToUnknown": true,
|
||||
"ignoreRestArgs": false
|
||||
}
|
||||
],
|
||||
@ -115,14 +120,24 @@
|
||||
"allowTupleTypes": "in-unions-and-intersections"
|
||||
}
|
||||
],
|
||||
"@typescript-eslint/no-untyped-public-signature": [
|
||||
"@typescript-eslint/no-unnecessary-condition": [
|
||||
"error",
|
||||
{
|
||||
"ignoredMethods": [
|
||||
"constructor"
|
||||
]
|
||||
"allowConstantLoopConditions": false
|
||||
}
|
||||
],
|
||||
"@typescript-eslint/no-unnecessary-type-assertion": [
|
||||
"error"
|
||||
],
|
||||
"@typescript-eslint/no-unsafe-call": [
|
||||
"error"
|
||||
],
|
||||
"@typescript-eslint/no-unsafe-member-access": [
|
||||
"error"
|
||||
],
|
||||
"@typescript-eslint/no-unsafe-return": [
|
||||
"error"
|
||||
],
|
||||
"@typescript-eslint/no-unused-vars": [
|
||||
"error",
|
||||
{
|
||||
@ -151,6 +166,12 @@
|
||||
"@typescript-eslint/no-var-requires": [
|
||||
"error"
|
||||
],
|
||||
"@typescript-eslint/prefer-readonly-parameter-types": [
|
||||
"error",
|
||||
{
|
||||
"checkParameterProperties": true
|
||||
}
|
||||
],
|
||||
"@typescript-eslint/quotes": [
|
||||
"error",
|
||||
"double",
|
||||
@ -180,14 +201,20 @@
|
||||
"@typescript-eslint/strict-boolean-expressions": [
|
||||
"error",
|
||||
{
|
||||
"allowNullable": false,
|
||||
"allowSafe": false,
|
||||
"ignoreRhs": false
|
||||
"allowAny": false,
|
||||
"allowNullableBoolean": false,
|
||||
"allowNullableNumber": false,
|
||||
"allowNullableObject": false,
|
||||
"allowNullableString": false,
|
||||
"allowNumber": false,
|
||||
"allowString": false
|
||||
}
|
||||
],
|
||||
"@typescript-eslint/type-annotation-spacing": [
|
||||
"error",
|
||||
{
|
||||
"after": true,
|
||||
"before": false,
|
||||
"overrides": {
|
||||
"arrow": {
|
||||
"after": true,
|
||||
@ -196,6 +223,22 @@
|
||||
"colon": {
|
||||
"after": true,
|
||||
"before": false
|
||||
},
|
||||
"parameter": {
|
||||
"after": true,
|
||||
"before": false
|
||||
},
|
||||
"property": {
|
||||
"after": true,
|
||||
"before": false
|
||||
},
|
||||
"returnType": {
|
||||
"after": true,
|
||||
"before": false
|
||||
},
|
||||
"variable": {
|
||||
"after": true,
|
||||
"before": false
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -209,7 +252,8 @@
|
||||
"objectDestructuring": true,
|
||||
"parameter": true,
|
||||
"propertyDeclaration": true,
|
||||
"variableDeclaration": true
|
||||
"variableDeclaration": true,
|
||||
"variableDeclarationIgnoreFunction": false
|
||||
}
|
||||
],
|
||||
"comma-spacing": [
|
||||
|
@ -8,9 +8,21 @@
|
||||
}
|
||||
}
|
||||
],
|
||||
"unicorn/import-index": [
|
||||
"error",
|
||||
{
|
||||
"ignoreImports": true
|
||||
}
|
||||
],
|
||||
"unicorn/no-console-spaces": [
|
||||
"error"
|
||||
],
|
||||
"unicorn/prefer-number-properties": [
|
||||
"error"
|
||||
],
|
||||
"unicorn/prefer-set-has": [
|
||||
"error"
|
||||
],
|
||||
"unicorn/prevent-abbreviations": [
|
||||
"error",
|
||||
{
|
||||
@ -25,5 +37,8 @@
|
||||
"replacements": {},
|
||||
"whitelist": {}
|
||||
}
|
||||
],
|
||||
"unicorn/string-content": [
|
||||
"error"
|
||||
]
|
||||
}
|
||||
|
@ -76,6 +76,12 @@
|
||||
"singleline": 8
|
||||
}
|
||||
],
|
||||
"vue/no-multi-spaces": [
|
||||
"error",
|
||||
{
|
||||
"ignoreProperties": false
|
||||
}
|
||||
],
|
||||
"vue/no-unused-vars": [
|
||||
"error"
|
||||
],
|
||||
|
5
src/rules/vue/overrides.json
Normal file
5
src/rules/vue/overrides.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"sort-keys": [
|
||||
"off"
|
||||
]
|
||||
}
|
@ -3,14 +3,18 @@ import rDefault from "./rules/typescript/default.json";
|
||||
module.exports = {
|
||||
"extends": [
|
||||
"./javascript",
|
||||
"plugin:@typescript-eslint/eslint-recommended",
|
||||
"plugin:@typescript-eslint/recommended",
|
||||
"plugin:@typescript-eslint/recommended-requiring-type-checking",
|
||||
"plugin:import/typescript",
|
||||
],
|
||||
"parser": "@typescript-eslint/parser",
|
||||
"parserOptions": {
|
||||
createDefaultProgram: true,
|
||||
},
|
||||
"plugins": [
|
||||
"@typescript-eslint",
|
||||
],
|
||||
"rules": { ...rDefault },
|
||||
"rules": {
|
||||
...rDefault,
|
||||
},
|
||||
};
|
||||
|
@ -1,4 +1,5 @@
|
||||
import rDefault from "./rules/vue/default.json";
|
||||
import rOverrides from "./rules/vue/overrides.json";
|
||||
|
||||
module.exports = {
|
||||
"extends": [
|
||||
@ -8,6 +9,16 @@ module.exports = {
|
||||
"plugin:vue/recommended",
|
||||
"plugin:vue/strongly-recommended",
|
||||
],
|
||||
"overrides": [
|
||||
{
|
||||
files: [
|
||||
"*.vue",
|
||||
],
|
||||
rules: {
|
||||
...rOverrides,
|
||||
},
|
||||
},
|
||||
],
|
||||
"parser": "vue-eslint-parser",
|
||||
"parserOptions": {
|
||||
extraFileExtensions: [
|
||||
@ -15,5 +26,7 @@ module.exports = {
|
||||
],
|
||||
},
|
||||
"plugins": ["vue"],
|
||||
"rules": { ...rDefault },
|
||||
"rules": {
|
||||
...rDefault,
|
||||
},
|
||||
};
|
||||
|
@ -1,4 +1,5 @@
|
||||
import rDefault from "./rules/vue/default.json";
|
||||
import rOverrides from "./rules/vue/overrides.json";
|
||||
|
||||
module.exports = {
|
||||
"extends": [
|
||||
@ -8,13 +9,26 @@ module.exports = {
|
||||
"plugin:vue/recommended",
|
||||
"plugin:vue/strongly-recommended",
|
||||
],
|
||||
"overrides": [
|
||||
{
|
||||
files: [
|
||||
"*.vue",
|
||||
],
|
||||
rules: {
|
||||
...rOverrides,
|
||||
},
|
||||
},
|
||||
],
|
||||
"parser": "vue-eslint-parser",
|
||||
"parserOptions": {
|
||||
createDefaultProgram: true,
|
||||
extraFileExtensions: [
|
||||
".vue",
|
||||
],
|
||||
parser: "@typescript-eslint/parser",
|
||||
},
|
||||
"plugins": ["vue"],
|
||||
"rules": { ...rDefault },
|
||||
"rules": {
|
||||
...rDefault,
|
||||
},
|
||||
};
|
||||
|
Reference in New Issue
Block a user