Skip to content

Commit f460165

Browse files
committed
💥 tweak rule options
1 parent 0592504 commit f460165

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

lib/configs/_base.js

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,13 @@ module.exports = {
2121
},
2222
rules: {
2323
// Enabled rules
24-
"accessor-pairs": "error",
24+
"accessor-pairs": ["error", { enforceForClassMembers: true }],
2525
"array-callback-return": "error",
2626
camelcase: "error",
2727
"consistent-return": "error",
2828
curly: "error",
2929
"default-case": "error",
30+
"default-param-last": "error",
3031
"dot-notation": "error",
3132
eqeqeq: ["error", "always", { null: "ignore" }],
3233
"for-direction": "error",
@@ -70,6 +71,7 @@ module.exports = {
7071
"no-implicit-coercion": "error",
7172
"no-implicit-globals": "error",
7273
"no-implied-eval": "error",
74+
"no-import-assign": "error",
7375
"no-inner-declarations": ["error", "functions"],
7476
"no-invalid-regexp": "error",
7577
"no-invalid-this": "error",
@@ -137,7 +139,7 @@ module.exports = {
137139
"no-unneeded-ternary": "error",
138140
"no-unreachable": "error",
139141
"no-unsafe-finally": "error",
140-
"no-unsafe-negation": "error",
142+
"no-unsafe-negation": ["error", { enforceForOrderingRelations: true }],
141143
"no-unused-expressions": "error",
142144
"no-unused-labels": "error",
143145
"no-unused-vars": [
@@ -206,7 +208,10 @@ module.exports = {
206208
},
207209
],
208210
strict: ["error", "global"],
209-
"use-isnan": "error",
211+
"use-isnan": [
212+
"error",
213+
{ enforceForIndexOf: true, enforceForSwitchCase: true },
214+
],
210215
"valid-typeof": ["error", { requireStringLiterals: true }],
211216
yoda: ["error", "never", { exceptRange: true }],
212217

@@ -283,7 +288,6 @@ module.exports = {
283288
"class-methods-use-this": "off",
284289
"consistent-this": "off",
285290
"constructor-super": "off",
286-
"default-param-last": "off",
287291
"func-name-matching": "off",
288292
"func-names": "off",
289293
"global-require": "off",
@@ -310,7 +314,6 @@ module.exports = {
310314
"no-dupe-class-members": "off",
311315
"no-duplicate-imports": "off",
312316
"no-eq-null": "off",
313-
"no-import-assign": "off",
314317
"no-inline-comments": "off",
315318
"no-labels": "off",
316319
"no-magic-numbers": "off",

lib/configs/_override-ts.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ module.exports = {
2020
"@mysticatea/ts/array-type": "error",
2121
"@mysticatea/ts/await-thenable": "error",
2222
"@mysticatea/ts/ban-ts-ignore": "error",
23-
"@mysticatea/ts/brace-style": "error",
2423
"@mysticatea/ts/class-name-casing": "error",
2524
"@mysticatea/ts/consistent-type-assertions": "error",
2625
"@mysticatea/ts/explicit-member-accessibility": "error",
@@ -99,6 +98,7 @@ module.exports = {
9998
"no-use-before-define": "off",
10099
"one-var": "off",
101100
"@mysticatea/ts/ban-types": "off",
101+
"@mysticatea/ts/brace-style": "off", // favor of Prettier.
102102
"@mysticatea/ts/consistent-type-definitions": "off",
103103
"@mysticatea/ts/explicit-function-return-type": "off", // I want but this is not so...
104104
"@mysticatea/ts/func-call-spacing": "off", // favor of Prettier.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"eslint-plugin-prettier": "~3.1.1",
2222
"eslint-plugin-vue": "~6.0.0",
2323
"prettier": "~1.19.1",
24-
"vue-eslint-parser": "^6.0.5"
24+
"vue-eslint-parser": "^7.0.0"
2525
},
2626
"devDependencies": {
2727
"@mysticatea/eslint-plugin": "file:.",

0 commit comments

Comments
 (0)