summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.npmignore2
-rw-r--r--README.md17
-rw-r--r--ROADMAP.md2
-rw-r--r--package.json18
-rw-r--r--src/rules/typescript/default.json10
-rw-r--r--src/rules/vue/default.json6
-rw-r--r--src/rules/vue/overrides.json5
-rw-r--r--src/vue-javascript.ts9
-rw-r--r--src/vue-typescript.ts9
-rw-r--r--yarn.lock56
10 files changed, 89 insertions, 45 deletions
diff --git a/.npmignore b/.npmignore
index c415f6e..62066aa 100644
--- a/.npmignore
+++ b/.npmignore
@@ -203,7 +203,7 @@ src/
# Configuration file
.editorconfig
.eslintrc.json
+.github/
.gitignore
-.gitlab-ci.yml
rollup.config.js
tsconfig.json
diff --git a/README.md b/README.md
index d2dc37c..2eec63c 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,19 @@
-# 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
diff --git a/ROADMAP.md b/ROADMAP.md
index 89a27b1..d16e2bb 100644
--- a/ROADMAP.md
+++ b/ROADMAP.md
@@ -568,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"
diff --git a/package.json b/package.json
index d9ff48a..febb7ca 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "@valentineus/eslint-config",
- "version": "0.0.14",
+ "version": "0.0.15",
"description": "Personal ESLint configuration",
"main": "index.js",
"repository": "git@code.valentineus.link:eslint-config.git",
@@ -13,14 +13,14 @@
"devDependencies": {
"@rollup/plugin-json": "^4.0.2",
"@rollup/plugin-typescript": "^3.0.0",
- "@typescript-eslint/eslint-plugin": "^2.25.0",
- "@typescript-eslint/parser": "^2.25.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": "^18.0.0",
+ "eslint-plugin-unicorn": "^18.0.1",
"eslint-plugin-vue": "^6.2.2",
"rollup": "^1.31.1",
"rollup-plugin-terser": "^5.2.0",
@@ -28,14 +28,14 @@
"typescript": "^3.7.5"
},
"peerDependencies": {
- "@typescript-eslint/eslint-plugin": "^2.25.0",
- "@typescript-eslint/parser": "^2.25.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": "^18.0.0",
+ "eslint-plugin-unicorn": "^18.0.1",
"eslint-plugin-vue": "^6.2.2"
},
"dependencies": {}
diff --git a/src/rules/typescript/default.json b/src/rules/typescript/default.json
index fe556bc..2b45050 100644
--- a/src/rules/typescript/default.json
+++ b/src/rules/typescript/default.json
@@ -222,7 +222,7 @@
"error",
{
"after": true,
- "before": true,
+ "before": false,
"overrides": {
"arrow": {
"after": true,
@@ -234,19 +234,19 @@
},
"parameter": {
"after": true,
- "before": true
+ "before": false
},
"property": {
"after": true,
- "before": true
+ "before": false
},
"returnType": {
"after": true,
- "before": true
+ "before": false
},
"variable": {
"after": true,
- "before": true
+ "before": false
}
}
}
diff --git a/src/rules/vue/default.json b/src/rules/vue/default.json
index 376b47c..145c8f2 100644
--- a/src/rules/vue/default.json
+++ b/src/rules/vue/default.json
@@ -76,6 +76,12 @@
"singleline": 8
}
],
+ "vue/no-multi-spaces": [
+ "error",
+ {
+ "ignoreProperties": false
+ }
+ ],
"vue/no-unused-vars": [
"error"
],
diff --git a/src/rules/vue/overrides.json b/src/rules/vue/overrides.json
new file mode 100644
index 0000000..8927171
--- /dev/null
+++ b/src/rules/vue/overrides.json
@@ -0,0 +1,5 @@
+{
+ "sort-keys": [
+ "off"
+ ]
+}
diff --git a/src/vue-javascript.ts b/src/vue-javascript.ts
index a3c7a46..39fba7d 100644
--- a/src/vue-javascript.ts
+++ b/src/vue-javascript.ts
@@ -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: [
diff --git a/src/vue-typescript.ts b/src/vue-typescript.ts
index f44c6f2..11d4d61 100644
--- a/src/vue-typescript.ts
+++ b/src/vue-typescript.ts
@@ -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": {
createDefaultProgram: true,
diff --git a/yarn.lock b/yarn.lock
index f618377..a96a393 100644
--- a/yarn.lock
+++ b/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.25.0":
- version "2.25.0"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.25.0.tgz#0b60917332f20dcff54d0eb9be2a9e9f4c9fbd02"
- integrity sha512-W2YyMtjmlrOjtXc+FtTelVs9OhuR6OlYc4XKIslJ8PUJOqgYYAPRJhAqkYRQo3G4sjvG8jSodsNycEn4W2gHUw==
+"@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.25.0"
+ "@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.25.0":
- version "2.25.0"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-2.25.0.tgz#13691c4fe368bd377b1e5b1e4ad660b220bf7714"
- integrity sha512-0IZ4ZR5QkFYbaJk+8eJ2kYeA+1tzOE1sBjbwwtSV85oNWYUBep+EyhlZ7DLUCyhMUGuJpcCCFL0fDtYAP1zMZw==
+"@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.25.0"
+ "@typescript-eslint/typescript-estree" "2.26.0"
eslint-scope "^5.0.0"
eslint-utils "^2.0.0"
-"@typescript-eslint/parser@^2.25.0":
- version "2.25.0"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-2.25.0.tgz#abfb3d999084824d9a756d9b9c0f36fba03adb76"
- integrity sha512-mccBLaBSpNVgp191CP5W+8U1crTyXsRziWliCqzj02kpxdjKMvFHGJbK33NroquH3zB/gZ8H511HEsJBa2fNEg==
+"@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.25.0"
- "@typescript-eslint/typescript-estree" "2.25.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.25.0":
- version "2.25.0"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-2.25.0.tgz#b790497556734b7476fa7dd3fa539955a5c79e2c"
- integrity sha512-VUksmx5lDxSi6GfmwSK7SSoIKSw9anukWWNitQPqt58LuYrKalzsgeuignbqnB+rK/xxGlSsCy8lYnwFfB6YJg==
+"@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"
@@ -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,10 +431,10 @@ 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@^18.0.0:
- version "18.0.0"
- resolved "https://registry.yarnpkg.com/eslint-plugin-unicorn/-/eslint-plugin-unicorn-18.0.0.tgz#94a8477d47f4d25fc931a27658dff44c0fcbc192"
- integrity sha512-2mk3Cz6H2LCsKSEmJ7Wmqm/XbMAQ55+PjSBFM2Yh1/A7uk2gryNNhdfbFDycsjs/ylqk0m7LJ4qPpK9OlP8f9A==
+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"