@pkmn/eslint-config 6.5.0 → 7.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -3
- package/index.js +45 -44
- package/package.json +6 -5
package/LICENSE
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2020-2023 pkmn contributors
|
|
1
|
+
Copyright (c) 2020-2024 pkmn contributors
|
|
4
2
|
|
|
5
3
|
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
6
4
|
this software and associated documentation files (the "Software"), to deal in
|
package/index.js
CHANGED
|
@@ -12,7 +12,7 @@ module.exports = {
|
|
|
12
12
|
"node": true
|
|
13
13
|
},
|
|
14
14
|
"settings": {"jest": {"version": 29}},
|
|
15
|
-
"plugins": ["import"],
|
|
15
|
+
"plugins": ["import", "@stylistic/eslint-plugin"],
|
|
16
16
|
"extends": "eslint:recommended",
|
|
17
17
|
"rules": {
|
|
18
18
|
"no-console": "off",
|
|
@@ -87,28 +87,29 @@ module.exports = {
|
|
|
87
87
|
|
|
88
88
|
// syntax style (local syntactical, usually autofixable formatting decisions)
|
|
89
89
|
|
|
90
|
-
"arrow-parens": "off",
|
|
90
|
+
"@stylistic/arrow-parens": "off",
|
|
91
91
|
"arrow-body-style": "error",
|
|
92
|
-
"brace-style": ["error", "1tbs", {"allowSingleLine": true}],
|
|
93
|
-
"comma-dangle": ["error", {
|
|
92
|
+
"@stylistic/brace-style": ["error", "1tbs", {"allowSingleLine": true}],
|
|
93
|
+
"@stylistic/comma-dangle": ["error", {
|
|
94
94
|
"arrays": "always-multiline",
|
|
95
95
|
"objects": "always-multiline",
|
|
96
96
|
"imports": "always-multiline",
|
|
97
97
|
"exports": "always-multiline",
|
|
98
|
+
"tuples": "always-multiline",
|
|
98
99
|
"functions": "ignore"
|
|
99
100
|
}],
|
|
100
|
-
"comma-style": ["error", "last"],
|
|
101
|
+
"@stylistic/comma-style": ["error", "last"],
|
|
101
102
|
"curly": ["error", "multi-line", "consistent"],
|
|
102
103
|
"dot-notation": "off",
|
|
103
104
|
"max-len": ["error", {"code": 100, "ignoreUrls": true}],
|
|
104
|
-
"new-parens": "error",
|
|
105
|
+
"@stylistic/new-parens": "error",
|
|
105
106
|
"no-array-constructor": "error",
|
|
106
107
|
"no-div-regex": "error",
|
|
107
108
|
"no-duplicate-imports": "error",
|
|
108
109
|
"no-extra-parens": "off",
|
|
109
|
-
"no-floating-decimal": "error",
|
|
110
|
+
"@stylistic/no-floating-decimal": "error",
|
|
110
111
|
"no-mixed-requires": "error",
|
|
111
|
-
"no-multi-spaces": "error",
|
|
112
|
+
"@stylistic/no-multi-spaces": "error",
|
|
112
113
|
"no-new-object": "error",
|
|
113
114
|
"no-octal-escape": "error",
|
|
114
115
|
"no-return-assign": ["error", "except-parens"],
|
|
@@ -128,40 +129,40 @@ module.exports = {
|
|
|
128
129
|
"semi": ["error", "always"],
|
|
129
130
|
"sort-vars": "off",
|
|
130
131
|
"vars-on-top": "off",
|
|
131
|
-
"wrap-iife": ["error", "inside"],
|
|
132
|
-
"wrap-regex": "off",
|
|
132
|
+
"@stylistic/wrap-iife": ["error", "inside"],
|
|
133
|
+
"@stylistic/wrap-regex": "off",
|
|
133
134
|
"yoda": ["error", "never", { "exceptRange": true }],
|
|
134
135
|
|
|
135
136
|
// whitespace
|
|
136
|
-
"array-bracket-spacing": ["error", "never"],
|
|
137
|
-
"arrow-spacing": ["error", {"before": true, "after": true}],
|
|
138
|
-
"block-spacing": ["error", "always"],
|
|
139
|
-
"comma-spacing": ["error", {"before": false, "after": true}],
|
|
140
|
-
"computed-property-spacing": ["error", "never"],
|
|
141
|
-
"dot-location": ["error", "property"],
|
|
142
|
-
"eol-last": ["error", "always"],
|
|
143
|
-
"func-call-spacing": "error",
|
|
144
|
-
"function-paren-newline": ["error", "consistent"],
|
|
145
|
-
"indent": ["error", 2, {"flatTernaryExpressions": true, "SwitchCase": 1}],
|
|
146
|
-
"key-spacing": "error",
|
|
147
|
-
"keyword-spacing": ["error", {"before": true, "after": true}],
|
|
148
|
-
"lines-around-comment": "off",
|
|
149
|
-
"no-mixed-spaces-and-tabs": "error",
|
|
150
|
-
"no-multiple-empty-lines": ["error", {"max": 1}],
|
|
151
|
-
"no-trailing-spaces": ["error", {"ignoreComments": false}],
|
|
152
|
-
"object-curly-spacing": ["error", "never"],
|
|
153
|
-
"operator-linebreak": ["error", "after", { "overrides": { "?": "before", ":": "before" } }],
|
|
154
|
-
"padded-blocks": ["error", "never"],
|
|
155
|
-
"padding-line-between-statements": "off",
|
|
156
|
-
"rest-spread-spacing": ["error", "never"],
|
|
157
|
-
"semi-spacing": ["error", {"before": false, "after": true}],
|
|
158
|
-
"space-before-blocks": ["error", "always"],
|
|
159
|
-
"space-before-function-paren": ["error", {"anonymous": "always", "named": "never"}],
|
|
160
|
-
"spaced-comment": ["error", "always", {"exceptions": ["*"]}],
|
|
161
|
-
"space-in-parens": ["error", "never"],
|
|
162
|
-
"space-infix-ops": "error",
|
|
163
|
-
"space-unary-ops": ["error", {"words": true, "nonwords": false}],
|
|
164
|
-
"template-curly-spacing": ["error", "never"],
|
|
137
|
+
"@stylistic/array-bracket-spacing": ["error", "never"],
|
|
138
|
+
"@stylistic/arrow-spacing": ["error", {"before": true, "after": true}],
|
|
139
|
+
"@stylistic/block-spacing": ["error", "always"],
|
|
140
|
+
"@stylistic/comma-spacing": ["error", {"before": false, "after": true}],
|
|
141
|
+
"@stylistic/computed-property-spacing": ["error", "never"],
|
|
142
|
+
"@stylistic/dot-location": ["error", "property"],
|
|
143
|
+
"@stylistic/eol-last": ["error", "always"],
|
|
144
|
+
"@stylistic/func-call-spacing": "error",
|
|
145
|
+
"@stylistic/function-paren-newline": ["error", "consistent"],
|
|
146
|
+
"@stylistic/indent": ["error", 2, {"flatTernaryExpressions": true, "SwitchCase": 1}],
|
|
147
|
+
"@stylistic/key-spacing": "error",
|
|
148
|
+
"@stylistic/keyword-spacing": ["error", {"before": true, "after": true}],
|
|
149
|
+
"@stylistic/lines-around-comment": "off",
|
|
150
|
+
"@stylistic/no-mixed-spaces-and-tabs": "error",
|
|
151
|
+
"@stylistic/no-multiple-empty-lines": ["error", {"max": 1}],
|
|
152
|
+
"@stylistic/no-trailing-spaces": ["error", {"ignoreComments": false}],
|
|
153
|
+
"@stylistic/object-curly-spacing": ["error", "never"],
|
|
154
|
+
"@stylistic/operator-linebreak": ["error", "after", { "overrides": { "?": "before", ":": "before" } }],
|
|
155
|
+
"@stylistic/padded-blocks": ["error", "never"],
|
|
156
|
+
"@stylistic/padding-line-between-statements": "off",
|
|
157
|
+
"@stylistic/rest-spread-spacing": ["error", "never"],
|
|
158
|
+
"@stylistic/semi-spacing": ["error", {"before": false, "after": true}],
|
|
159
|
+
"@stylistic/space-before-blocks": ["error", "always"],
|
|
160
|
+
"@stylistic/space-before-function-paren": ["error", {"anonymous": "always", "named": "never"}],
|
|
161
|
+
"@stylistic/spaced-comment": ["error", "always", {"exceptions": ["*"]}],
|
|
162
|
+
"@stylistic/space-in-parens": ["error", "never"],
|
|
163
|
+
"@stylistic/space-infix-ops": "error",
|
|
164
|
+
"@stylistic/space-unary-ops": ["error", {"words": true, "nonwords": false}],
|
|
165
|
+
"@stylistic/template-curly-spacing": ["error", "never"],
|
|
165
166
|
|
|
166
167
|
// imports
|
|
167
168
|
"import/order": ["error", {
|
|
@@ -195,7 +196,7 @@ module.exports = {
|
|
|
195
196
|
// "@typescript-eslint/no-type-alias": "error",
|
|
196
197
|
|
|
197
198
|
"@typescript-eslint/no-namespace": "off",
|
|
198
|
-
"new-parens": "off", // used for the `new class {...}` pattern
|
|
199
|
+
"@stylistic/new-parens": "off", // used for the `new class {...}` pattern
|
|
199
200
|
"no-prototype-builtins": "off",
|
|
200
201
|
|
|
201
202
|
// typescript-eslint defaults too strict
|
|
@@ -253,16 +254,16 @@ module.exports = {
|
|
|
253
254
|
"@typescript-eslint/semi": ["error", "always"],
|
|
254
255
|
|
|
255
256
|
// whitespace
|
|
256
|
-
"@
|
|
257
|
-
"spaced-comment": ["error", "always", {"exceptions": ["*", "/"]}],
|
|
257
|
+
"@stylistic/type-annotation-spacing": "error",
|
|
258
|
+
"@stylistic/spaced-comment": ["error", "always", {"exceptions": ["*", "/"]}],
|
|
258
259
|
|
|
259
260
|
// overriding base
|
|
260
|
-
"indent": "off",
|
|
261
|
-
"@typescript-eslint/indent": ["error", 2, {"flatTernaryExpressions": true, "SwitchCase": 1}],
|
|
262
261
|
"no-use-before-define": "off",
|
|
263
262
|
"@typescript-eslint/no-use-before-define": ["error", {"functions": false, "classes": false, "variables": false}],
|
|
264
263
|
"no-shadow": "off",
|
|
265
264
|
"@typescript-eslint/no-shadow": ["error"],
|
|
265
|
+
// BUG: conflicts with @stylistic/object-curly-spacing in TypeScript types
|
|
266
|
+
"@stylistic/block-spacing": "off",
|
|
266
267
|
|
|
267
268
|
// types
|
|
268
269
|
"@typescript-eslint/restrict-plus-operands": "off",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pkmn/eslint-config",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.0",
|
|
4
4
|
"description": "ESLint configuration from @pkmn based on Pokémon Showdown's style",
|
|
5
5
|
"repository": "github:pkmn/eslint-config",
|
|
6
6
|
"license": "MIT",
|
|
@@ -11,11 +11,12 @@
|
|
|
11
11
|
"index.js"
|
|
12
12
|
],
|
|
13
13
|
"peerDependencies": {
|
|
14
|
-
"@
|
|
15
|
-
"@typescript-eslint/
|
|
16
|
-
"eslint": "^
|
|
14
|
+
"@stylistic/eslint-plugin": "^1.6.2",
|
|
15
|
+
"@typescript-eslint/eslint-plugin": "^7.1",
|
|
16
|
+
"@typescript-eslint/parser": "^7.1",
|
|
17
|
+
"eslint": "^8.57",
|
|
17
18
|
"eslint-plugin-import": ">=2.29",
|
|
18
|
-
"eslint-plugin-jest": ">=27.
|
|
19
|
+
"eslint-plugin-jest": ">=27.9",
|
|
19
20
|
"typescript": ">=5.3"
|
|
20
21
|
}
|
|
21
22
|
}
|