@rhyster/eslint-config 1.0.1 → 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/eslint.config.d.ts +14 -11
- package/dist/eslint.config.d.ts.map +1 -1
- package/dist/index.cjs +12 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +14 -12
- package/dist/index.d.mts +14 -12
- package/dist/index.d.ts +14 -12
- package/dist/index.mjs +10 -4
- package/dist/index.mjs.map +1 -1
- package/dist/src/index.d.ts +14 -12
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/typescript.d.ts +1 -0
- package/dist/src/typescript.d.ts.map +1 -1
- package/package.json +5 -5
- package/src/index.ts +7 -3
- package/src/typescript.ts +3 -0
package/dist/src/index.d.ts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
import nodePlugin from 'eslint-plugin-n';
|
|
1
2
|
import type { Linter } from 'eslint';
|
|
2
3
|
type Config = Linter.Config;
|
|
3
4
|
type Plugin = NonNullable<Config['plugins']>[string];
|
|
4
5
|
type Parser = NonNullable<Config['languageOptions']>['parser'];
|
|
5
6
|
export declare const core: [{
|
|
7
|
+
readonly rules: Readonly<import("eslint").Linter.RulesRecord>;
|
|
8
|
+
}, {
|
|
6
9
|
readonly name: "@rhyster/eslint-config/files-ts";
|
|
7
10
|
readonly files: ["**/*.ts"];
|
|
8
11
|
}, {
|
|
@@ -33,7 +36,7 @@ export declare const core: [{
|
|
|
33
36
|
readonly 'import-x/ignore': readonly ["node_modules", "\\.(coffee|scss|css|less|hbs|svg|json)$"];
|
|
34
37
|
readonly 'import-x/external-module-folders': readonly ["node_modules", "node_modules/@types"];
|
|
35
38
|
};
|
|
36
|
-
}, {
|
|
39
|
+
}, ...Linter.Config<Linter.RulesRecord>[], {
|
|
37
40
|
name: string;
|
|
38
41
|
rules: {
|
|
39
42
|
'accessor-pairs': "off";
|
|
@@ -829,9 +832,12 @@ export declare const core: [{
|
|
|
829
832
|
'import-x/default': "off";
|
|
830
833
|
'import-x/no-named-as-default-member': "off";
|
|
831
834
|
'import-x/no-unresolved': "off";
|
|
835
|
+
'@typescript-eslint/strict-boolean-expressions': "error";
|
|
832
836
|
};
|
|
833
837
|
}];
|
|
834
838
|
export declare const node: [{
|
|
839
|
+
readonly rules: Readonly<import("eslint").Linter.RulesRecord>;
|
|
840
|
+
}, {
|
|
835
841
|
readonly name: "@rhyster/eslint-config/files-ts";
|
|
836
842
|
readonly files: ["**/*.ts"];
|
|
837
843
|
}, {
|
|
@@ -862,7 +868,7 @@ export declare const node: [{
|
|
|
862
868
|
readonly 'import-x/ignore': readonly ["node_modules", "\\.(coffee|scss|css|less|hbs|svg|json)$"];
|
|
863
869
|
readonly 'import-x/external-module-folders': readonly ["node_modules", "node_modules/@types"];
|
|
864
870
|
};
|
|
865
|
-
}, {
|
|
871
|
+
}, ...Linter.Config<Linter.RulesRecord>[], {
|
|
866
872
|
name: string;
|
|
867
873
|
rules: {
|
|
868
874
|
'accessor-pairs': "off";
|
|
@@ -1658,6 +1664,7 @@ export declare const node: [{
|
|
|
1658
1664
|
'import-x/default': "off";
|
|
1659
1665
|
'import-x/no-named-as-default-member': "off";
|
|
1660
1666
|
'import-x/no-unresolved': "off";
|
|
1667
|
+
'@typescript-eslint/strict-boolean-expressions': "error";
|
|
1661
1668
|
};
|
|
1662
1669
|
}, {
|
|
1663
1670
|
readonly name: string;
|
|
@@ -1755,19 +1762,13 @@ export declare const node: [{
|
|
|
1755
1762
|
};
|
|
1756
1763
|
readonly plugins: {
|
|
1757
1764
|
readonly n: import("eslint").ESLint.Plugin & {
|
|
1758
|
-
configs:
|
|
1759
|
-
'recommended-module': import("eslint").ESLint.ConfigData;
|
|
1760
|
-
'recommended-script': import("eslint").ESLint.ConfigData;
|
|
1761
|
-
recommended: import("eslint").ESLint.ConfigData;
|
|
1762
|
-
'flat/recommended-module': import("eslint").Linter.FlatConfig;
|
|
1763
|
-
'flat/recommended-script': import("eslint").Linter.FlatConfig;
|
|
1764
|
-
'flat/recommended': import("eslint").Linter.FlatConfig;
|
|
1765
|
-
'flat/mixed-esm-and-cjs': import("eslint").Linter.FlatConfig[];
|
|
1766
|
-
};
|
|
1765
|
+
configs: nodePlugin.Configs;
|
|
1767
1766
|
};
|
|
1768
1767
|
};
|
|
1769
1768
|
}];
|
|
1770
1769
|
export declare const browser: [{
|
|
1770
|
+
readonly rules: Readonly<import("eslint").Linter.RulesRecord>;
|
|
1771
|
+
}, {
|
|
1771
1772
|
readonly name: "@rhyster/eslint-config/files-ts";
|
|
1772
1773
|
readonly files: ["**/*.ts"];
|
|
1773
1774
|
}, {
|
|
@@ -1798,7 +1799,7 @@ export declare const browser: [{
|
|
|
1798
1799
|
readonly 'import-x/ignore': readonly ["node_modules", "\\.(coffee|scss|css|less|hbs|svg|json)$"];
|
|
1799
1800
|
readonly 'import-x/external-module-folders': readonly ["node_modules", "node_modules/@types"];
|
|
1800
1801
|
};
|
|
1801
|
-
}, {
|
|
1802
|
+
}, ...Linter.Config<Linter.RulesRecord>[], {
|
|
1802
1803
|
name: string;
|
|
1803
1804
|
rules: {
|
|
1804
1805
|
'accessor-pairs': "off";
|
|
@@ -2594,6 +2595,7 @@ export declare const browser: [{
|
|
|
2594
2595
|
'import-x/default': "off";
|
|
2595
2596
|
'import-x/no-named-as-default-member': "off";
|
|
2596
2597
|
'import-x/no-unresolved': "off";
|
|
2598
|
+
'@typescript-eslint/strict-boolean-expressions': "error";
|
|
2597
2599
|
};
|
|
2598
2600
|
}, {
|
|
2599
2601
|
readonly languageOptions: {
|
package/dist/src/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":"AAGA,OAAO,UAAU,MAAM,iBAAiB,CAAC;AAczC,OAAO,KAAK,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmFN,CAAC"}
|
package/dist/src/typescript.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typescript.d.ts","sourceRoot":"","sources":["../../src/typescript.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"typescript.d.ts","sourceRoot":"","sources":["../../src/typescript.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,wBA0F0B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rhyster/eslint-config",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "ESLint config",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -47,13 +47,13 @@
|
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"@eslint/js": "^9.13.0",
|
|
50
|
-
"@stylistic/eslint-plugin": "^2.
|
|
50
|
+
"@stylistic/eslint-plugin": "^2.10.0",
|
|
51
51
|
"confusing-browser-globals": "^1.0.11",
|
|
52
52
|
"eslint-import-resolver-typescript": "^3.6.3",
|
|
53
|
-
"eslint-plugin-import-x": "^4.
|
|
54
|
-
"eslint-plugin-n": "^17.
|
|
53
|
+
"eslint-plugin-import-x": "^4.4.0",
|
|
54
|
+
"eslint-plugin-n": "^17.12.0",
|
|
55
55
|
"globals": "^15.11.0",
|
|
56
|
-
"typescript-eslint": "^8.12.
|
|
56
|
+
"typescript-eslint": "^8.12.2"
|
|
57
57
|
},
|
|
58
58
|
"packageManager": "pnpm@9.12.3+sha512.cce0f9de9c5a7c95bef944169cc5dfe8741abfb145078c0d508b868056848a87c81e626246cb60967cbd7fd29a6c062ef73ff840d96b3c86c40ac92cf4a813ee"
|
|
59
59
|
}
|
package/src/index.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import js from '@eslint/js';
|
|
1
2
|
import stylistic from '@stylistic/eslint-plugin';
|
|
2
3
|
import importx from 'eslint-plugin-import-x';
|
|
3
4
|
import nodePlugin from 'eslint-plugin-n';
|
|
4
5
|
import globals from 'globals';
|
|
5
|
-
import
|
|
6
|
+
import ts from 'typescript-eslint';
|
|
6
7
|
|
|
7
8
|
import bestPractices from './airbnb/best-practices.ts';
|
|
8
9
|
import errors from './airbnb/errors.ts';
|
|
@@ -23,12 +24,12 @@ type Parser = NonNullable<Config['languageOptions']>['parser'];
|
|
|
23
24
|
const general = {
|
|
24
25
|
name: '@rhyster/eslint-config/airbnb/general',
|
|
25
26
|
plugins: {
|
|
26
|
-
'@typescript-eslint':
|
|
27
|
+
'@typescript-eslint': ts.plugin as Plugin,
|
|
27
28
|
'@stylistic': stylistic as Plugin,
|
|
28
29
|
'import-x': importx as unknown as Plugin,
|
|
29
30
|
},
|
|
30
31
|
languageOptions: {
|
|
31
|
-
parser:
|
|
32
|
+
parser: ts.parser as Parser,
|
|
32
33
|
parserOptions: {
|
|
33
34
|
projectService: true,
|
|
34
35
|
},
|
|
@@ -73,11 +74,14 @@ const general = {
|
|
|
73
74
|
} as const satisfies Config;
|
|
74
75
|
|
|
75
76
|
export const core = [
|
|
77
|
+
js.configs.recommended,
|
|
76
78
|
{
|
|
77
79
|
name: '@rhyster/eslint-config/files-ts',
|
|
78
80
|
files: ['**/*.ts'],
|
|
79
81
|
},
|
|
80
82
|
general,
|
|
83
|
+
...ts.configs.strictTypeChecked as unknown as Linter.Config[],
|
|
84
|
+
...ts.configs.stylisticTypeChecked as unknown as Linter.Config[],
|
|
81
85
|
bestPractices,
|
|
82
86
|
errors,
|
|
83
87
|
style,
|
package/src/typescript.ts
CHANGED
|
@@ -86,5 +86,8 @@ export default {
|
|
|
86
86
|
'import-x/default': 'off',
|
|
87
87
|
'import-x/no-named-as-default-member': 'off',
|
|
88
88
|
'import-x/no-unresolved': 'off',
|
|
89
|
+
|
|
90
|
+
// https://typescript-eslint.io/rules/strict-boolean-expressions/
|
|
91
|
+
'@typescript-eslint/strict-boolean-expressions': 'error',
|
|
89
92
|
},
|
|
90
93
|
} satisfies Linter.Config;
|