Compare commits
41 Commits
Author | SHA1 | Date | |
---|---|---|---|
fe85ed91d7 | |||
6587de6ea8 | |||
![]() |
354d343ce6 | ||
c9e51ad9e8 | |||
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 | |||
43b1db10b8 | |||
3e8a92c176 |
@ -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
|
||||
|
17
.github/workflows/main.yml
vendored
Normal file
17
.github/workflows/main.yml
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
name: Workflow
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
mirror:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- uses: yesolutions/mirror-action@master
|
||||
with:
|
||||
REMOTE: 'https://git.popov.link/eslint-config.git'
|
||||
GIT_USERNAME: ${{ secrets.GIT_USERNAME }}
|
||||
GIT_PASSWORD: ${{ secrets.GIT_PASSWORD }}
|
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: yarn install
|
||||
- run: yarn run build
|
||||
- run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_AUTH_TOKEN }}" > ~/.npmrc
|
||||
- run: npm publish
|
@ -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).
|
||||
|
69
ROADMAP.md
69
ROADMAP.md
@ -331,7 +331,7 @@
|
||||
- [ ] "no-unused-modules"
|
||||
- [ ] "no-useless-path-segments"
|
||||
- [X] "no-webpack-loader-syntax"
|
||||
- [ ] "order"
|
||||
- [X] "order"
|
||||
- [ ] "prefer-default-export"
|
||||
- [ ] "unambiguous"
|
||||
|
||||
@ -353,31 +353,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
|
||||
|
||||
@ -389,6 +389,7 @@
|
||||
- [ ] "ban-types"
|
||||
- [ ] "brace-style"
|
||||
- [ ] "camelcase"
|
||||
- [X] "class-literal-property-style"
|
||||
- [ ] "class-name-casing"
|
||||
- [X] "comma-spacing"
|
||||
- [ ] "consistent-type-assertions"
|
||||
@ -406,6 +407,7 @@
|
||||
- [ ] "member-ordering"
|
||||
- [ ] "naming-convention"
|
||||
- [ ] "no-array-constructor"
|
||||
- [X] "no-base-to-string"
|
||||
- [ ] "no-dupe-class-members"
|
||||
- [ ] "no-dynamic-delete"
|
||||
- [ ] "no-empty-function"
|
||||
@ -431,10 +433,13 @@
|
||||
- [ ] "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-unnecessary-type-assertion"
|
||||
- [X] "no-unsafe-call"
|
||||
- [X] "no-unsafe-member-access"
|
||||
- [X] "no-unsafe-return"
|
||||
- [X] "no-untyped-public-signature"
|
||||
- [ ] "no-unused-expressions"
|
||||
- [X] "no-unused-vars"
|
||||
@ -450,6 +455,7 @@
|
||||
- [ ] "prefer-nullish-coalescing"
|
||||
- [ ] "prefer-optional-chain"
|
||||
- [ ] "prefer-readonly"
|
||||
- [X] "prefer-readonly-parameter-types"
|
||||
- [ ] "prefer-regexp-exec"
|
||||
- [ ] "prefer-string-starts-ends-with"
|
||||
- [ ] "promise-function-async"
|
||||
@ -480,7 +486,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"
|
||||
@ -507,9 +513,11 @@
|
||||
- [ ] "prefer-negative-index"
|
||||
- [ ] "prefer-node-append"
|
||||
- [ ] "prefer-node-remove"
|
||||
- [X] "prefer-number-properties"
|
||||
- [ ] "prefer-query-selector"
|
||||
- [ ] "prefer-reflect-apply"
|
||||
- [ ] "prefer-replace-all"
|
||||
- [X] "prefer-set-has"
|
||||
- [ ] "prefer-spread"
|
||||
- [ ] "prefer-starts-ends-with"
|
||||
- [ ] "prefer-string-slice"
|
||||
@ -517,7 +525,6 @@
|
||||
- [ ] "prefer-trim-start-end"
|
||||
- [ ] "prefer-type-error"
|
||||
- [X] "prevent-abbreviations"
|
||||
- [ ] "regex-shorthand"
|
||||
- [ ] "throw-new-error"
|
||||
|
||||
## Vue
|
||||
@ -561,7 +568,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"
|
||||
|
22
package.json
22
package.json
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@valentineus/eslint-config",
|
||||
"version": "0.0.10",
|
||||
"version": "0.0.15",
|
||||
"description": "Personal ESLint configuration",
|
||||
"main": "index.js",
|
||||
"repository": "git@code.valentineus.link:eslint-config.git",
|
||||
@ -13,30 +13,30 @@
|
||||
"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",
|
||||
"@typescript-eslint/eslint-plugin": "^2.26.0",
|
||||
"@typescript-eslint/parser": "^2.26.0",
|
||||
"eslint": "^6.8.0",
|
||||
"eslint-plugin-eslint-comments": "^3.1.2",
|
||||
"eslint-plugin-import": "^2.20.1",
|
||||
"eslint-plugin-import": "^2.20.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",
|
||||
"eslint-plugin-unicorn": "^18.0.1",
|
||||
"eslint-plugin-vue": "^6.2.2",
|
||||
"rollup": "^1.31.1",
|
||||
"rollup-plugin-terser": "^5.2.0",
|
||||
"tslib": "^1.10.0",
|
||||
"typescript": "^3.7.5"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@typescript-eslint/eslint-plugin": "^2.19.0",
|
||||
"@typescript-eslint/parser": "^2.19.0",
|
||||
"@typescript-eslint/eslint-plugin": "^2.26.0",
|
||||
"@typescript-eslint/parser": "^2.26.0",
|
||||
"eslint": "^6.8.0",
|
||||
"eslint-plugin-eslint-comments": "^3.1.2",
|
||||
"eslint-plugin-import": "^2.20.1",
|
||||
"eslint-plugin-import": "^2.20.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": "^18.0.1",
|
||||
"eslint-plugin-vue": "^6.2.2"
|
||||
},
|
||||
"dependencies": {}
|
||||
}
|
||||
|
@ -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"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -177,6 +177,7 @@
|
||||
"code": 180,
|
||||
"comments": 72,
|
||||
"ignoreComments": false,
|
||||
"ignorePattern": "eslint*",
|
||||
"ignoreRegExpLiterals": false,
|
||||
"ignoreStrings": true,
|
||||
"ignoreTemplateLiterals": true,
|
||||
|
@ -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",
|
||||
{
|
||||
@ -64,6 +68,9 @@
|
||||
"prefixWithI": "always"
|
||||
}
|
||||
],
|
||||
"@typescript-eslint/no-base-to-string": [
|
||||
"error"
|
||||
],
|
||||
"@typescript-eslint/no-empty-interface": [
|
||||
"warn",
|
||||
{
|
||||
@ -73,7 +80,7 @@
|
||||
"@typescript-eslint/no-explicit-any": [
|
||||
"warn",
|
||||
{
|
||||
"fixToUnknown": false,
|
||||
"fixToUnknown": true,
|
||||
"ignoreRestArgs": false
|
||||
}
|
||||
],
|
||||
@ -115,8 +122,28 @@
|
||||
"allowTupleTypes": "in-unions-and-intersections"
|
||||
}
|
||||
],
|
||||
"@typescript-eslint/no-untyped-public-signature": [
|
||||
"@typescript-eslint/no-unnecessary-condition": [
|
||||
"error",
|
||||
{
|
||||
"allowConstantLoopConditions": false,
|
||||
"checkArrayPredicates": true,
|
||||
"ignoreRhs": true
|
||||
}
|
||||
],
|
||||
"@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-untyped-public-signature": [
|
||||
"warn",
|
||||
{
|
||||
"ignoredMethods": [
|
||||
"constructor"
|
||||
@ -151,6 +178,12 @@
|
||||
"@typescript-eslint/no-var-requires": [
|
||||
"error"
|
||||
],
|
||||
"@typescript-eslint/prefer-readonly-parameter-types": [
|
||||
"error",
|
||||
{
|
||||
"checkParameterProperties": true
|
||||
}
|
||||
],
|
||||
"@typescript-eslint/quotes": [
|
||||
"error",
|
||||
"double",
|
||||
@ -188,6 +221,8 @@
|
||||
"@typescript-eslint/type-annotation-spacing": [
|
||||
"error",
|
||||
{
|
||||
"after": true,
|
||||
"before": false,
|
||||
"overrides": {
|
||||
"arrow": {
|
||||
"after": true,
|
||||
@ -196,6 +231,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 +260,8 @@
|
||||
"objectDestructuring": true,
|
||||
"parameter": true,
|
||||
"propertyDeclaration": true,
|
||||
"variableDeclaration": true
|
||||
"variableDeclaration": true,
|
||||
"variableDeclarationIgnoreFunction": false
|
||||
}
|
||||
],
|
||||
"comma-spacing": [
|
||||
|
@ -2,13 +2,27 @@
|
||||
"unicorn/filename-case": [
|
||||
"error",
|
||||
{
|
||||
"kebabCase": true,
|
||||
"pascalCase": true
|
||||
"cases": {
|
||||
"kebabCase": true,
|
||||
"pascalCase": true
|
||||
}
|
||||
}
|
||||
],
|
||||
"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",
|
||||
{
|
||||
@ -23,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"
|
||||
]
|
||||
}
|
@ -9,6 +9,9 @@ module.exports = {
|
||||
"plugin:import/typescript",
|
||||
],
|
||||
"parser": "@typescript-eslint/parser",
|
||||
"parserOptions": {
|
||||
createDefaultProgram: true,
|
||||
},
|
||||
"plugins": [
|
||||
"@typescript-eslint",
|
||||
],
|
||||
|
@ -1,4 +1,5 @@
|
||||
import rDefault from "./rules/vue/default.json";
|
||||
import rOverrides from "./rules/vue/overrides.json";
|
||||
|
||||
module.exports = {
|
||||
"extends": [
|
||||
@ -8,6 +9,14 @@ module.exports = {
|
||||
"plugin:vue/recommended",
|
||||
"plugin:vue/strongly-recommended",
|
||||
],
|
||||
"overrides": [
|
||||
{
|
||||
files: [
|
||||
"*.vue",
|
||||
],
|
||||
rules: { ...rOverrides },
|
||||
},
|
||||
],
|
||||
"parser": "vue-eslint-parser",
|
||||
"parserOptions": {
|
||||
extraFileExtensions: [
|
||||
|
@ -1,4 +1,5 @@
|
||||
import rDefault from "./rules/vue/default.json";
|
||||
import rOverrides from "./rules/vue/overrides.json";
|
||||
|
||||
module.exports = {
|
||||
"extends": [
|
||||
@ -8,8 +9,17 @@ module.exports = {
|
||||
"plugin:vue/recommended",
|
||||
"plugin:vue/strongly-recommended",
|
||||
],
|
||||
"overrides": [
|
||||
{
|
||||
files: [
|
||||
"*.vue",
|
||||
],
|
||||
rules: { ...rOverrides },
|
||||
},
|
||||
],
|
||||
"parser": "vue-eslint-parser",
|
||||
"parserOptions": {
|
||||
createDefaultProgram: true,
|
||||
extraFileExtensions: [
|
||||
".vue",
|
||||
],
|
||||
|
130
yarn.lock
130
yarn.lock
@ -65,40 +65,40 @@
|
||||
resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz#e486d0d97396d79beedd0a6e33f4534ff6b4973e"
|
||||
integrity sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA==
|
||||
|
||||
"@typescript-eslint/eslint-plugin@^2.20.0":
|
||||
version "2.20.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.20.0.tgz#a522d0e1e4898f7c9c6a8e1ed3579b60867693fa"
|
||||
integrity sha512-cimIdVDV3MakiGJqMXw51Xci6oEDEoPkvh8ggJe2IIzcc0fYqAxOXN6Vbeanahz6dLZq64W+40iUEc9g32FLDQ==
|
||||
"@typescript-eslint/eslint-plugin@^2.26.0":
|
||||
version "2.26.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.26.0.tgz#04c96560c8981421e5a9caad8394192363cc423f"
|
||||
integrity sha512-4yUnLv40bzfzsXcTAtZyTjbiGUXMrcIJcIMioI22tSOyAxpdXiZ4r7YQUU8Jj6XXrLz9d5aMHPQf5JFR7h27Nw==
|
||||
dependencies:
|
||||
"@typescript-eslint/experimental-utils" "2.20.0"
|
||||
eslint-utils "^1.4.3"
|
||||
"@typescript-eslint/experimental-utils" "2.26.0"
|
||||
functional-red-black-tree "^1.0.1"
|
||||
regexpp "^3.0.0"
|
||||
tsutils "^3.17.1"
|
||||
|
||||
"@typescript-eslint/experimental-utils@2.20.0":
|
||||
version "2.20.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-2.20.0.tgz#3b6fa5a6b8885f126d5a4280e0d44f0f41e73e32"
|
||||
integrity sha512-fEBy9xYrwG9hfBLFEwGW2lKwDRTmYzH3DwTmYbT+SMycmxAoPl0eGretnBFj/s+NfYBG63w/5c3lsvqqz5mYag==
|
||||
"@typescript-eslint/experimental-utils@2.26.0":
|
||||
version "2.26.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-2.26.0.tgz#063390c404d9980767d76274df386c0aa675d91d"
|
||||
integrity sha512-RELVoH5EYd+JlGprEyojUv9HeKcZqF7nZUGSblyAw1FwOGNnmQIU8kxJ69fttQvEwCsX5D6ECJT8GTozxrDKVQ==
|
||||
dependencies:
|
||||
"@types/json-schema" "^7.0.3"
|
||||
"@typescript-eslint/typescript-estree" "2.20.0"
|
||||
"@typescript-eslint/typescript-estree" "2.26.0"
|
||||
eslint-scope "^5.0.0"
|
||||
eslint-utils "^2.0.0"
|
||||
|
||||
"@typescript-eslint/parser@^2.20.0":
|
||||
version "2.20.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-2.20.0.tgz#608e5bb06ba98a415b64ace994c79ab20f9772a9"
|
||||
integrity sha512-o8qsKaosLh2qhMZiHNtaHKTHyCHc3Triq6aMnwnWj7budm3xAY9owSZzV1uon5T9cWmJRJGzTFa90aex4m77Lw==
|
||||
"@typescript-eslint/parser@^2.26.0":
|
||||
version "2.26.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-2.26.0.tgz#385463615818b33acb72a25b39c03579df93d76f"
|
||||
integrity sha512-+Xj5fucDtdKEVGSh9353wcnseMRkPpEAOY96EEenN7kJVrLqy/EVwtIh3mxcUz8lsFXW1mT5nN5vvEam/a5HiQ==
|
||||
dependencies:
|
||||
"@types/eslint-visitor-keys" "^1.0.0"
|
||||
"@typescript-eslint/experimental-utils" "2.20.0"
|
||||
"@typescript-eslint/typescript-estree" "2.20.0"
|
||||
"@typescript-eslint/experimental-utils" "2.26.0"
|
||||
"@typescript-eslint/typescript-estree" "2.26.0"
|
||||
eslint-visitor-keys "^1.1.0"
|
||||
|
||||
"@typescript-eslint/typescript-estree@2.20.0":
|
||||
version "2.20.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-2.20.0.tgz#90a0f5598826b35b966ca83483b1a621b1a4d0c9"
|
||||
integrity sha512-WlFk8QtI8pPaE7JGQGxU7nGcnk1ccKAJkhbVookv94ZcAef3m6oCE/jEDL6dGte3JcD7reKrA0o55XhBRiVT3A==
|
||||
"@typescript-eslint/typescript-estree@2.26.0":
|
||||
version "2.26.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-2.26.0.tgz#d8132cf1ee8a72234f996519a47d8a9118b57d56"
|
||||
integrity sha512-3x4SyZCLB4zsKsjuhxDLeVJN6W29VwBnYpCsZ7vIdPel9ZqLfIZJgJXO47MNUkurGpQuIBALdPQKtsSnWpE1Yg==
|
||||
dependencies:
|
||||
debug "^4.1.1"
|
||||
eslint-visitor-keys "^1.1.0"
|
||||
@ -114,9 +114,9 @@ acorn-jsx@^5.1.0:
|
||||
integrity sha512-tMUqwBWfLFbJbizRmEcWSLw6HnFzfdJs2sOJEOwwtVPMoH/0Ay+E703oZz78VSXZiiDcZrQ5XKjPIUQixhmgVw==
|
||||
|
||||
acorn@^7.1.0:
|
||||
version "7.1.0"
|
||||
resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.1.0.tgz#949d36f2c292535da602283586c2477c57eb2d6c"
|
||||
integrity sha512-kL5CuoXA/dgxlBbVrflsflzQ3PAas7RYZB52NOm/6839iVYJgKMJ3cQJD+t2i5+qFa8h3MDpEOJiS64E8JLnSQ==
|
||||
version "7.1.1"
|
||||
resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.1.1.tgz#e35668de0b402f359de515c5482a1ab9f89a69bf"
|
||||
integrity sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg==
|
||||
|
||||
ajv@^6.10.0, ajv@^6.10.2:
|
||||
version "6.11.0"
|
||||
@ -401,10 +401,10 @@ eslint-plugin-eslint-comments@^3.1.2:
|
||||
escape-string-regexp "^1.0.5"
|
||||
ignore "^5.0.5"
|
||||
|
||||
eslint-plugin-import@^2.20.1:
|
||||
version "2.20.1"
|
||||
resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.20.1.tgz#802423196dcb11d9ce8435a5fc02a6d3b46939b3"
|
||||
integrity sha512-qQHgFOTjguR+LnYRoToeZWT62XM55MBVXObHM6SKFd1VzDcX/vqT1kAz8ssqigh5eMj8qXcRoXXGZpPP6RfdCw==
|
||||
eslint-plugin-import@^2.20.2:
|
||||
version "2.20.2"
|
||||
resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.20.2.tgz#91fc3807ce08be4837141272c8b99073906e588d"
|
||||
integrity sha512-FObidqpXrR8OnCh4iNsxy+WACztJLXAHBO5hK79T1Hc77PgQZkyDGA5Ag9xAvRpglvLNxhH/zSmZ70/pZ31dHg==
|
||||
dependencies:
|
||||
array-includes "^3.0.3"
|
||||
array.prototype.flat "^1.2.1"
|
||||
@ -431,32 +431,27 @@ eslint-plugin-sonarjs@^0.5.0:
|
||||
resolved "https://registry.yarnpkg.com/eslint-plugin-sonarjs/-/eslint-plugin-sonarjs-0.5.0.tgz#ce17b2daba65a874c2862213a9e38e8986ad7d7d"
|
||||
integrity sha512-XW5MnzlRjhXpIdbULC/qAdJYHWw3rRLws/DyawdlPU/IdVr9AmRK1r2LaCvabwKOAW2XYYSo3kDX58E4MrB7PQ==
|
||||
|
||||
eslint-plugin-unicorn@^16.1.1:
|
||||
version "16.1.1"
|
||||
resolved "https://registry.yarnpkg.com/eslint-plugin-unicorn/-/eslint-plugin-unicorn-16.1.1.tgz#012c598d71914ef30f5d386dd85110e59f2ef999"
|
||||
integrity sha512-IMxCsntb0T8s660Irc40gtzXtxuXHcOn36G9G8OYKfiseBD/kNrA1cNJhsJ0xQteDASGrFwqdzBsYEkUvczhOA==
|
||||
eslint-plugin-unicorn@^18.0.1:
|
||||
version "18.0.1"
|
||||
resolved "https://registry.yarnpkg.com/eslint-plugin-unicorn/-/eslint-plugin-unicorn-18.0.1.tgz#8d3285ffa57b2f6b07550b94e62228d93bf61813"
|
||||
integrity sha512-Y4bgygek4x4ogeMcSHr6MZi3frBPZ80eIpMOsxew7jAblb53OYflpRh0an62Z6jv/fw7D3TkXauqLOBWbT9adg==
|
||||
dependencies:
|
||||
ci-info "^2.0.0"
|
||||
clean-regexp "^1.0.0"
|
||||
eslint-ast-utils "^1.1.0"
|
||||
eslint-template-visitor "^1.1.0"
|
||||
import-modules "^2.0.0"
|
||||
lodash.camelcase "^4.3.0"
|
||||
lodash.defaultsdeep "^4.6.1"
|
||||
lodash.kebabcase "^4.1.1"
|
||||
lodash.snakecase "^4.1.1"
|
||||
lodash.upperfirst "^4.3.1"
|
||||
lodash "^4.17.15"
|
||||
read-pkg-up "^7.0.1"
|
||||
regexp-tree "^0.1.17"
|
||||
regexpp "^3.0.0"
|
||||
regexp-tree "^0.1.21"
|
||||
reserved-words "^0.1.2"
|
||||
safe-regex "^2.1.1"
|
||||
semver "^7.1.2"
|
||||
semver "^7.1.3"
|
||||
|
||||
eslint-plugin-vue@^6.2.1:
|
||||
version "6.2.1"
|
||||
resolved "https://registry.yarnpkg.com/eslint-plugin-vue/-/eslint-plugin-vue-6.2.1.tgz#ca802df5c33146aed1e56bb21d250c1abb6120a3"
|
||||
integrity sha512-MiIDOotoWseIfLIfGeDzF6sDvHkVvGd2JgkvjyHtN3q4RoxdAXrAMuI3SXTOKatljgacKwpNAYShmcKZa4yZzw==
|
||||
eslint-plugin-vue@^6.2.2:
|
||||
version "6.2.2"
|
||||
resolved "https://registry.yarnpkg.com/eslint-plugin-vue/-/eslint-plugin-vue-6.2.2.tgz#27fecd9a3a24789b0f111ecdd540a9e56198e0fe"
|
||||
integrity sha512-Nhc+oVAHm0uz/PkJAWscwIT4ijTrK5fqNqz9QB1D35SbbuMG1uB6Yr5AJpvPSWg+WOw7nYNswerYh0kOk64gqQ==
|
||||
dependencies:
|
||||
natural-compare "^1.4.0"
|
||||
semver "^5.6.0"
|
||||
@ -486,6 +481,13 @@ eslint-utils@^1.4.3:
|
||||
dependencies:
|
||||
eslint-visitor-keys "^1.1.0"
|
||||
|
||||
eslint-utils@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-2.0.0.tgz#7be1cc70f27a72a76cd14aa698bcabed6890e1cd"
|
||||
integrity sha512-0HCPuJv+7Wv1bACm8y5/ECVfYdfsAm9xmVb7saeFlxjPYALefjhbYoCkBjPdPzGH8wWyTpAez82Fh3VKYEZ8OA==
|
||||
dependencies:
|
||||
eslint-visitor-keys "^1.1.0"
|
||||
|
||||
eslint-visitor-keys@^1.1.0:
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz#e2a82cea84ff246ad6fb57f9bde5b46621459ec2"
|
||||
@ -929,45 +931,20 @@ locate-path@^5.0.0:
|
||||
dependencies:
|
||||
p-locate "^4.1.0"
|
||||
|
||||
lodash.camelcase@^4.3.0:
|
||||
version "4.3.0"
|
||||
resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6"
|
||||
integrity sha1-soqmKIorn8ZRA1x3EfZathkDMaY=
|
||||
|
||||
lodash.defaultsdeep@^4.6.1:
|
||||
version "4.6.1"
|
||||
resolved "https://registry.yarnpkg.com/lodash.defaultsdeep/-/lodash.defaultsdeep-4.6.1.tgz#512e9bd721d272d94e3d3a63653fa17516741ca6"
|
||||
integrity sha512-3j8wdDzYuWO3lM3Reg03MuQR957t287Rpcxp1njpEa8oDrikb+FwGdW3n+FELh/A6qib6yPit0j/pv9G/yeAqA==
|
||||
|
||||
lodash.get@^4.4.2:
|
||||
version "4.4.2"
|
||||
resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99"
|
||||
integrity sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=
|
||||
|
||||
lodash.kebabcase@^4.1.1:
|
||||
version "4.1.1"
|
||||
resolved "https://registry.yarnpkg.com/lodash.kebabcase/-/lodash.kebabcase-4.1.1.tgz#8489b1cb0d29ff88195cceca448ff6d6cc295c36"
|
||||
integrity sha1-hImxyw0p/4gZXM7KRI/21swpXDY=
|
||||
|
||||
lodash.snakecase@^4.1.1:
|
||||
version "4.1.1"
|
||||
resolved "https://registry.yarnpkg.com/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz#39d714a35357147837aefd64b5dcbb16becd8f8d"
|
||||
integrity sha1-OdcUo1NXFHg3rv1ktdy7Fr7Nj40=
|
||||
|
||||
lodash.upperfirst@^4.3.1:
|
||||
version "4.3.1"
|
||||
resolved "https://registry.yarnpkg.com/lodash.upperfirst/-/lodash.upperfirst-4.3.1.tgz#1365edf431480481ef0d1c68957a5ed99d49f7ce"
|
||||
integrity sha1-E2Xt9DFIBIHvDRxolXpe2Z1J984=
|
||||
|
||||
lodash.zip@^4.2.0:
|
||||
version "4.2.0"
|
||||
resolved "https://registry.yarnpkg.com/lodash.zip/-/lodash.zip-4.2.0.tgz#ec6662e4896408ed4ab6c542a3990b72cc080020"
|
||||
integrity sha1-7GZi5IlkCO1KtsVCo5kLcswIACA=
|
||||
|
||||
lodash@^4.17.14, lodash@^4.17.15:
|
||||
version "4.17.15"
|
||||
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548"
|
||||
integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==
|
||||
version "4.17.19"
|
||||
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.19.tgz#e48ddedbe30b3321783c5b4301fbd353bc1e4a4b"
|
||||
integrity sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==
|
||||
|
||||
merge-stream@^2.0.0:
|
||||
version "2.0.0"
|
||||
@ -1256,7 +1233,12 @@ read-pkg@^5.2.0:
|
||||
parse-json "^5.0.0"
|
||||
type-fest "^0.6.0"
|
||||
|
||||
regexp-tree@^0.1.17, regexp-tree@~0.1.1:
|
||||
regexp-tree@^0.1.21:
|
||||
version "0.1.21"
|
||||
resolved "https://registry.yarnpkg.com/regexp-tree/-/regexp-tree-0.1.21.tgz#55e2246b7f7d36f1b461490942fa780299c400d7"
|
||||
integrity sha512-kUUXjX4AnqnR8KRTCrayAo9PzYMRKmVoGgaz2tBuz0MF3g1ZbGebmtW0yFHfFK9CmBjQKeYIgoL22pFLBJY7sw==
|
||||
|
||||
regexp-tree@~0.1.1:
|
||||
version "0.1.19"
|
||||
resolved "https://registry.yarnpkg.com/regexp-tree/-/regexp-tree-0.1.19.tgz#9326e91d8d1d23298dd33a78cf5e788f57cdc359"
|
||||
integrity sha512-mVeVLF/qg5qFbZSW0f7pXbuVX73dKIjuhOyC2JLKxzmpya75O4qLcvI9j0jp31Iz7IAkEVHa1UErDCAqaLKo5A==
|
||||
@ -1378,7 +1360,7 @@ semver@^6.1.2, semver@^6.3.0:
|
||||
resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d"
|
||||
integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==
|
||||
|
||||
semver@^7.1.2:
|
||||
semver@^7.1.3:
|
||||
version "7.1.3"
|
||||
resolved "https://registry.yarnpkg.com/semver/-/semver-7.1.3.tgz#e4345ce73071c53f336445cfc19efb1c311df2a6"
|
||||
integrity sha512-ekM0zfiA9SCBlsKa2X1hxyxiI4L3B6EbVJkkdgQXnSEEaHlGdvyodMruTiulSRWMMB4NeIuYNMC9rTKTz97GxA==
|
||||
|
Loading…
x
Reference in New Issue
Block a user