@newsteam/eslint-config 1.2.14 → 1.2.16
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/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -3
- package/dist/plugins/stylistic.d.ts.map +1 -1
- package/dist/plugins/stylistic.js +19 -2
- package/dist/plugins/typescript.d.ts.map +1 -1
- package/dist/plugins/typescript.js +10 -1
- package/dist/plugins/unicorn.d.ts.map +1 -1
- package/dist/plugins/unicorn.js +6 -0
- package/package.json +3 -3
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAgDA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AA6CrC,QAAA,MAAM,MAAM,EAAE,MAAM,CAAC,MAAM,EA4HzB,CAAC;AAGH,eAAe,MAAM,CAAC;AAGtB,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
makes sense in this case
|
|
11
11
|
|
|
12
12
|
*/
|
|
13
|
-
import eslint from "@eslint/js";
|
|
14
13
|
import { createTypeScriptImportResolver } from "eslint-import-resolver-typescript";
|
|
15
14
|
import { createNodeResolver } from "eslint-plugin-import-x";
|
|
16
15
|
import { defineConfig } from "eslint/config";
|
|
@@ -74,8 +73,6 @@ const tsLanguageOptions = {
|
|
|
74
73
|
},
|
|
75
74
|
};
|
|
76
75
|
const config = defineConfig([
|
|
77
|
-
eslint.configs.recommended,
|
|
78
|
-
tseslint.configs.strict,
|
|
79
76
|
{
|
|
80
77
|
files: ["**/*.{js,jsx,mjs,cjs}"],
|
|
81
78
|
languageOptions: jsLanguageOptions,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stylistic.d.ts","sourceRoot":"","sources":["../../src/plugins/stylistic.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAER,MAAM,EACT,MAAM,QAAQ,CAAC;AAQhB,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"stylistic.d.ts","sourceRoot":"","sources":["../../src/plugins/stylistic.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAER,MAAM,EACT,MAAM,QAAQ,CAAC;AAQhB,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EA++B1C,CAAC"}
|
|
@@ -155,9 +155,26 @@ export const stylisticPlugin = [
|
|
|
155
155
|
*/
|
|
156
156
|
"@stylistic/eol-last": "warn",
|
|
157
157
|
/*
|
|
158
|
-
* Enforce consistent
|
|
158
|
+
* Enforce consistent line break styles for JSX props. (experimental)
|
|
159
159
|
*
|
|
160
|
-
* https://eslint.style/rules/default/
|
|
160
|
+
* https://eslint.style/rules/default/jsx-props-style
|
|
161
|
+
*/
|
|
162
|
+
"@stylistic/exp-jsx-props-style": [
|
|
163
|
+
"off",
|
|
164
|
+
{
|
|
165
|
+
multiLine: {
|
|
166
|
+
maxItemsPerLine: 1,
|
|
167
|
+
minItems: 0,
|
|
168
|
+
},
|
|
169
|
+
singleLine: {
|
|
170
|
+
maxItems: 1,
|
|
171
|
+
},
|
|
172
|
+
},
|
|
173
|
+
],
|
|
174
|
+
/*
|
|
175
|
+
* Enforce consistent spacing and line break styles inside brackets. (experimental)
|
|
176
|
+
*
|
|
177
|
+
* https://eslint.style/rules/default/list-style
|
|
161
178
|
*/
|
|
162
179
|
"@stylistic/exp-list-style": [
|
|
163
180
|
"warn",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typescript.d.ts","sourceRoot":"","sources":["../../src/plugins/typescript.ts"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAQrC,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"typescript.d.ts","sourceRoot":"","sources":["../../src/plugins/typescript.ts"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAQrC,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,EA+zC3C,CAAC"}
|
|
@@ -39,6 +39,7 @@ export const typescriptPlugin = [
|
|
|
39
39
|
"no-undef": "off",
|
|
40
40
|
"no-undef-init": "off",
|
|
41
41
|
"no-undefined": "off",
|
|
42
|
+
"no-unused-expressions": "off",
|
|
42
43
|
"no-unused-private-class-members": "off",
|
|
43
44
|
"no-unused-vars": "off",
|
|
44
45
|
"no-use-before-define": "off",
|
|
@@ -995,7 +996,15 @@ export const typescriptPlugin = [
|
|
|
995
996
|
*
|
|
996
997
|
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-nullish-coalescing.mdx
|
|
997
998
|
*/
|
|
998
|
-
"@typescript-eslint/prefer-nullish-coalescing":
|
|
999
|
+
"@typescript-eslint/prefer-nullish-coalescing": [
|
|
1000
|
+
"warn",
|
|
1001
|
+
{
|
|
1002
|
+
ignorePrimitives: {
|
|
1003
|
+
boolean: true,
|
|
1004
|
+
string: true,
|
|
1005
|
+
},
|
|
1006
|
+
},
|
|
1007
|
+
],
|
|
999
1008
|
/*
|
|
1000
1009
|
* Prefer using concise optional chain expressions instead of chained logical ands
|
|
1001
1010
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unicorn.d.ts","sourceRoot":"","sources":["../../src/plugins/unicorn.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAER,MAAM,EACT,MAAM,QAAQ,CAAC;AAQhB,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"unicorn.d.ts","sourceRoot":"","sources":["../../src/plugins/unicorn.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAER,MAAM,EACT,MAAM,QAAQ,CAAC;AAQhB,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,MAAM,EAwmCxC,CAAC"}
|
package/dist/plugins/unicorn.js
CHANGED
|
@@ -129,6 +129,12 @@ export const unicornPlugin = [
|
|
|
129
129
|
* https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/import-style.md
|
|
130
130
|
*/
|
|
131
131
|
"unicorn/import-style": "off",
|
|
132
|
+
/*
|
|
133
|
+
* Prevent usage of variables from outside the scope of isolated functions
|
|
134
|
+
*
|
|
135
|
+
* https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/isolated-functions.md
|
|
136
|
+
*/
|
|
137
|
+
"unicorn/isolated-functions": "warn",
|
|
132
138
|
/*
|
|
133
139
|
* Enforce the use of new for all builtins, except String, Number and Boolean. (fixable)
|
|
134
140
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@newsteam/eslint-config",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.16",
|
|
4
4
|
"description": "Shared config for eslint",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"eslint-plugin-array-func": "5.1.0",
|
|
64
64
|
"eslint-plugin-css-modules": "2.12.0",
|
|
65
65
|
"eslint-plugin-destructuring": "2.2.1",
|
|
66
|
-
"eslint-plugin-import-newlines": "
|
|
66
|
+
"eslint-plugin-import-newlines": "2.0.0",
|
|
67
67
|
"eslint-plugin-import-x": "4.16.1",
|
|
68
68
|
"eslint-plugin-newline-destructuring": "1.2.2",
|
|
69
69
|
"eslint-plugin-no-unsanitized": "4.1.4",
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
},
|
|
89
89
|
"devDependencies": {
|
|
90
90
|
"@types/eslint-plugin-security": "3.0.1",
|
|
91
|
-
"@types/node": "25.
|
|
91
|
+
"@types/node": "25.3.0",
|
|
92
92
|
"eslint": "9.39.2"
|
|
93
93
|
}
|
|
94
94
|
}
|