@egy186/eslint-config 1.0.2 → 1.2.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/dist/base.d.ts +1 -1
- package/dist/base.js +1 -1
- package/dist/browser.d.ts +5 -1
- package/dist/commonjs.d.ts +1 -1
- package/dist/react.d.ts +1 -0
- package/dist/react.js +1 -1
- package/dist/typescript.d.ts +8 -3
- package/dist/typescript.js +7 -2
- package/package.json +12 -12
package/dist/base.d.ts
CHANGED
|
@@ -144,7 +144,7 @@ declare const config: {
|
|
|
144
144
|
readonly sourceType: "module";
|
|
145
145
|
};
|
|
146
146
|
readonly linterOptions: {
|
|
147
|
-
readonly reportUnusedDisableDirectives:
|
|
147
|
+
readonly reportUnusedDisableDirectives: "error";
|
|
148
148
|
};
|
|
149
149
|
readonly plugins: {
|
|
150
150
|
readonly '@stylistic': ESLint.Plugin;
|
package/dist/base.js
CHANGED
package/dist/browser.d.ts
CHANGED
|
@@ -45,6 +45,7 @@ declare const config: {
|
|
|
45
45
|
readonly BackgroundFetchManager: false;
|
|
46
46
|
readonly BackgroundFetchRecord: false;
|
|
47
47
|
readonly BackgroundFetchRegistration: false;
|
|
48
|
+
readonly BarcodeDetector: false;
|
|
48
49
|
readonly BarProp: false;
|
|
49
50
|
readonly BaseAudioContext: false;
|
|
50
51
|
readonly BatteryManager: false;
|
|
@@ -648,6 +649,8 @@ declare const config: {
|
|
|
648
649
|
readonly onresize: true;
|
|
649
650
|
readonly onscroll: true;
|
|
650
651
|
readonly onscrollend: true;
|
|
652
|
+
readonly onscrollsnapchange: true;
|
|
653
|
+
readonly onscrollsnapchanging: true;
|
|
651
654
|
readonly onsearch: true;
|
|
652
655
|
readonly onsecuritypolicyviolation: true;
|
|
653
656
|
readonly onseeked: true;
|
|
@@ -839,6 +842,7 @@ declare const config: {
|
|
|
839
842
|
readonly showDirectoryPicker: false;
|
|
840
843
|
readonly showOpenFilePicker: false;
|
|
841
844
|
readonly showSaveFilePicker: false;
|
|
845
|
+
readonly SnapEvent: false;
|
|
842
846
|
readonly SourceBuffer: false;
|
|
843
847
|
readonly SourceBufferList: false;
|
|
844
848
|
readonly speechSynthesis: false;
|
|
@@ -1701,7 +1705,7 @@ declare const config: {
|
|
|
1701
1705
|
};
|
|
1702
1706
|
readonly files: ["**/*.{js,jsx,mjs}", "**/*.{ts,tsx,mts}"];
|
|
1703
1707
|
readonly linterOptions: {
|
|
1704
|
-
readonly reportUnusedDisableDirectives:
|
|
1708
|
+
readonly reportUnusedDisableDirectives: "error";
|
|
1705
1709
|
};
|
|
1706
1710
|
readonly plugins: {
|
|
1707
1711
|
readonly '@stylistic': import("eslint").ESLint.Plugin;
|
package/dist/commonjs.d.ts
CHANGED
|
@@ -655,7 +655,7 @@ declare const config: {
|
|
|
655
655
|
readonly 'valid-typeof': "error";
|
|
656
656
|
};
|
|
657
657
|
readonly linterOptions: {
|
|
658
|
-
readonly reportUnusedDisableDirectives:
|
|
658
|
+
readonly reportUnusedDisableDirectives: "error";
|
|
659
659
|
};
|
|
660
660
|
readonly plugins: {
|
|
661
661
|
readonly '@stylistic': import("eslint").ESLint.Plugin;
|
package/dist/react.d.ts
CHANGED
|
@@ -27,6 +27,7 @@ declare const config: {
|
|
|
27
27
|
readonly 'react/forbid-elements': "off";
|
|
28
28
|
readonly 'react/forbid-foreign-prop-types': "error";
|
|
29
29
|
readonly 'react/forbid-prop-types': "error";
|
|
30
|
+
readonly 'react/forward-ref-uses-ref': "error";
|
|
30
31
|
readonly 'react/function-component-definition': ["error", {
|
|
31
32
|
readonly namedComponents: "arrow-function";
|
|
32
33
|
readonly unnamedComponents: "arrow-function";
|
package/dist/react.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { fixupPluginRules } from '@eslint/compat';
|
|
2
|
-
// @ts-expect-error TS7016
|
|
3
2
|
import react from 'eslint-plugin-react';
|
|
4
3
|
// @ts-expect-error TS7016
|
|
5
4
|
import reactHooksPlugin from 'eslint-plugin-react-hooks';
|
|
@@ -29,6 +28,7 @@ const config = {
|
|
|
29
28
|
'react/forbid-elements': 'off',
|
|
30
29
|
'react/forbid-foreign-prop-types': 'error',
|
|
31
30
|
'react/forbid-prop-types': 'error',
|
|
31
|
+
'react/forward-ref-uses-ref': 'error',
|
|
32
32
|
'react/function-component-definition': [
|
|
33
33
|
'error',
|
|
34
34
|
{
|
package/dist/typescript.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import type { ESLint, Linter } from 'eslint';
|
|
2
|
+
import type { configs } from 'typescript-eslint';
|
|
3
|
+
type ParserOptions = NonNullable<(NonNullable<typeof configs.base.languageOptions>)['parserOptions']>;
|
|
2
4
|
declare const config: {
|
|
3
5
|
readonly files: ["**/*.{ts,tsx,mts,cts}"];
|
|
4
6
|
readonly languageOptions: {
|
|
@@ -175,6 +177,11 @@ declare const config: {
|
|
|
175
177
|
readonly 'consistent-return': "off";
|
|
176
178
|
readonly 'default-param-last': "off";
|
|
177
179
|
readonly 'dot-notation': "off";
|
|
180
|
+
readonly 'import/default': "off";
|
|
181
|
+
readonly 'import/named': "off";
|
|
182
|
+
readonly 'import/namespace': "off";
|
|
183
|
+
readonly 'import/no-named-as-default-member': "off";
|
|
184
|
+
readonly 'import/no-unresolved': "off";
|
|
178
185
|
readonly 'init-declarations': "off";
|
|
179
186
|
readonly 'max-params': "off";
|
|
180
187
|
readonly 'no-array-constructor': "off";
|
|
@@ -207,8 +214,6 @@ declare const config: {
|
|
|
207
214
|
};
|
|
208
215
|
};
|
|
209
216
|
};
|
|
210
|
-
declare const typescriptConfig: (parserOptions:
|
|
211
|
-
project: readonly string[] | boolean | string;
|
|
212
|
-
}>) => Linter.FlatConfig;
|
|
217
|
+
declare const typescriptConfig: (parserOptions: ParserOptions) => Linter.FlatConfig;
|
|
213
218
|
export { config as typescript, typescriptConfig };
|
|
214
219
|
export default config;
|
package/dist/typescript.js
CHANGED
|
@@ -179,6 +179,11 @@ const config = {
|
|
|
179
179
|
'consistent-return': 'off',
|
|
180
180
|
'default-param-last': 'off',
|
|
181
181
|
'dot-notation': 'off',
|
|
182
|
+
'import/default': 'off',
|
|
183
|
+
'import/named': 'off',
|
|
184
|
+
'import/namespace': 'off',
|
|
185
|
+
'import/no-named-as-default-member': 'off',
|
|
186
|
+
'import/no-unresolved': 'off',
|
|
182
187
|
'init-declarations': 'off',
|
|
183
188
|
'max-params': 'off',
|
|
184
189
|
'no-array-constructor': 'off',
|
|
@@ -222,13 +227,13 @@ const config = {
|
|
|
222
227
|
}
|
|
223
228
|
}
|
|
224
229
|
};
|
|
230
|
+
// eslint-disable-next-line @typescript-eslint/prefer-readonly-parameter-types
|
|
225
231
|
const typescriptConfig = (parserOptions) => ({
|
|
226
232
|
...config,
|
|
227
233
|
languageOptions: {
|
|
228
234
|
...config.languageOptions,
|
|
229
235
|
parserOptions: {
|
|
230
|
-
|
|
231
|
-
projectService: false,
|
|
236
|
+
sourceType: 'module',
|
|
232
237
|
...parserOptions
|
|
233
238
|
}
|
|
234
239
|
}
|
package/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@egy186/eslint-config",
|
|
3
3
|
"description": "Eslint shareable config",
|
|
4
|
-
"version": "1.0
|
|
4
|
+
"version": "1.2.0",
|
|
5
5
|
"author": "egy186",
|
|
6
6
|
"bugs": {
|
|
7
7
|
"url": "https://github.com/egy186/eslint-config/issues"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"@stylistic/eslint-plugin": "~2.8.0",
|
|
11
|
-
"eslint-plugin-import": "~2.
|
|
12
|
-
"eslint-plugin-jsdoc": "~50.
|
|
13
|
-
"eslint-plugin-n": "~17.10.
|
|
14
|
-
"globals": "^15.
|
|
11
|
+
"eslint-plugin-import": "~2.31.0",
|
|
12
|
+
"eslint-plugin-jsdoc": "~50.3.1",
|
|
13
|
+
"eslint-plugin-n": "~17.10.3",
|
|
14
|
+
"globals": "^15.10.0"
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
17
|
"@eslint-stylistic/metadata": "~2.8.0",
|
|
@@ -19,16 +19,16 @@
|
|
|
19
19
|
"@eslint/js": "~8.57.0",
|
|
20
20
|
"@types/eslint": "^8.56.12",
|
|
21
21
|
"@types/eslint__js": "^8.42.3",
|
|
22
|
-
"@types/node": "^20.16.
|
|
23
|
-
"eslint": "~8.57.
|
|
22
|
+
"@types/node": "^20.16.10",
|
|
23
|
+
"eslint": "~8.57.1",
|
|
24
24
|
"eslint-import-resolver-typescript": "~3.6.3",
|
|
25
25
|
"eslint-plugin-jest": "~28.8.3",
|
|
26
|
-
"eslint-plugin-react": "~7.
|
|
26
|
+
"eslint-plugin-react": "~7.37.1",
|
|
27
27
|
"eslint-plugin-react-hooks": "~4.6.2",
|
|
28
|
-
"husky": "^9.1.
|
|
28
|
+
"husky": "^9.1.6",
|
|
29
29
|
"jiti": "^1.21.6",
|
|
30
|
-
"typescript": "~5.5.
|
|
31
|
-
"typescript-eslint": "~8.
|
|
30
|
+
"typescript": "~5.5.4",
|
|
31
|
+
"typescript-eslint": "~8.8.0"
|
|
32
32
|
},
|
|
33
33
|
"engines": {
|
|
34
34
|
"node": ">=18.18.0"
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"eslint": "^8.50.0",
|
|
67
67
|
"eslint-import-resolver-typescript": "^3.6.1",
|
|
68
68
|
"eslint-plugin-jest": "^28.8.3",
|
|
69
|
-
"eslint-plugin-react": "^7.
|
|
69
|
+
"eslint-plugin-react": "^7.36.1",
|
|
70
70
|
"eslint-plugin-react-hooks": "^4.3.0",
|
|
71
71
|
"typescript": "^5.0.4",
|
|
72
72
|
"typescript-eslint": "^8.5.0"
|