@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/index.d.cts
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import * as eslint from 'eslint';
|
|
2
2
|
import { Linter } from 'eslint';
|
|
3
|
+
import nodePlugin from 'eslint-plugin-n';
|
|
3
4
|
|
|
4
5
|
type Config = Linter.Config;
|
|
5
6
|
type Plugin = NonNullable<Config['plugins']>[string];
|
|
6
7
|
type Parser = NonNullable<Config['languageOptions']>['parser'];
|
|
7
8
|
declare const core: [{
|
|
9
|
+
readonly rules: Readonly<eslint.Linter.RulesRecord>;
|
|
10
|
+
}, {
|
|
8
11
|
readonly name: "@rhyster/eslint-config/files-ts";
|
|
9
12
|
readonly files: ["**/*.ts"];
|
|
10
13
|
}, {
|
|
@@ -35,7 +38,7 @@ declare const core: [{
|
|
|
35
38
|
readonly 'import-x/ignore': readonly ["node_modules", "\\.(coffee|scss|css|less|hbs|svg|json)$"];
|
|
36
39
|
readonly 'import-x/external-module-folders': readonly ["node_modules", "node_modules/@types"];
|
|
37
40
|
};
|
|
38
|
-
}, {
|
|
41
|
+
}, ...Linter.Config<Linter.RulesRecord>[], {
|
|
39
42
|
name: string;
|
|
40
43
|
rules: {
|
|
41
44
|
'accessor-pairs': "off";
|
|
@@ -831,9 +834,12 @@ declare const core: [{
|
|
|
831
834
|
'import-x/default': "off";
|
|
832
835
|
'import-x/no-named-as-default-member': "off";
|
|
833
836
|
'import-x/no-unresolved': "off";
|
|
837
|
+
'@typescript-eslint/strict-boolean-expressions': "error";
|
|
834
838
|
};
|
|
835
839
|
}];
|
|
836
840
|
declare const node: [{
|
|
841
|
+
readonly rules: Readonly<eslint.Linter.RulesRecord>;
|
|
842
|
+
}, {
|
|
837
843
|
readonly name: "@rhyster/eslint-config/files-ts";
|
|
838
844
|
readonly files: ["**/*.ts"];
|
|
839
845
|
}, {
|
|
@@ -864,7 +870,7 @@ declare const node: [{
|
|
|
864
870
|
readonly 'import-x/ignore': readonly ["node_modules", "\\.(coffee|scss|css|less|hbs|svg|json)$"];
|
|
865
871
|
readonly 'import-x/external-module-folders': readonly ["node_modules", "node_modules/@types"];
|
|
866
872
|
};
|
|
867
|
-
}, {
|
|
873
|
+
}, ...Linter.Config<Linter.RulesRecord>[], {
|
|
868
874
|
name: string;
|
|
869
875
|
rules: {
|
|
870
876
|
'accessor-pairs': "off";
|
|
@@ -1660,6 +1666,7 @@ declare const node: [{
|
|
|
1660
1666
|
'import-x/default': "off";
|
|
1661
1667
|
'import-x/no-named-as-default-member': "off";
|
|
1662
1668
|
'import-x/no-unresolved': "off";
|
|
1669
|
+
'@typescript-eslint/strict-boolean-expressions': "error";
|
|
1663
1670
|
};
|
|
1664
1671
|
}, {
|
|
1665
1672
|
readonly name: string;
|
|
@@ -1757,19 +1764,13 @@ declare const node: [{
|
|
|
1757
1764
|
};
|
|
1758
1765
|
readonly plugins: {
|
|
1759
1766
|
readonly n: eslint.ESLint.Plugin & {
|
|
1760
|
-
configs:
|
|
1761
|
-
'recommended-module': eslint.ESLint.ConfigData;
|
|
1762
|
-
'recommended-script': eslint.ESLint.ConfigData;
|
|
1763
|
-
recommended: eslint.ESLint.ConfigData;
|
|
1764
|
-
'flat/recommended-module': eslint.Linter.FlatConfig;
|
|
1765
|
-
'flat/recommended-script': eslint.Linter.FlatConfig;
|
|
1766
|
-
'flat/recommended': eslint.Linter.FlatConfig;
|
|
1767
|
-
'flat/mixed-esm-and-cjs': eslint.Linter.FlatConfig[];
|
|
1768
|
-
};
|
|
1767
|
+
configs: nodePlugin.Configs;
|
|
1769
1768
|
};
|
|
1770
1769
|
};
|
|
1771
1770
|
}];
|
|
1772
1771
|
declare const browser: [{
|
|
1772
|
+
readonly rules: Readonly<eslint.Linter.RulesRecord>;
|
|
1773
|
+
}, {
|
|
1773
1774
|
readonly name: "@rhyster/eslint-config/files-ts";
|
|
1774
1775
|
readonly files: ["**/*.ts"];
|
|
1775
1776
|
}, {
|
|
@@ -1800,7 +1801,7 @@ declare const browser: [{
|
|
|
1800
1801
|
readonly 'import-x/ignore': readonly ["node_modules", "\\.(coffee|scss|css|less|hbs|svg|json)$"];
|
|
1801
1802
|
readonly 'import-x/external-module-folders': readonly ["node_modules", "node_modules/@types"];
|
|
1802
1803
|
};
|
|
1803
|
-
}, {
|
|
1804
|
+
}, ...Linter.Config<Linter.RulesRecord>[], {
|
|
1804
1805
|
name: string;
|
|
1805
1806
|
rules: {
|
|
1806
1807
|
'accessor-pairs': "off";
|
|
@@ -2596,6 +2597,7 @@ declare const browser: [{
|
|
|
2596
2597
|
'import-x/default': "off";
|
|
2597
2598
|
'import-x/no-named-as-default-member': "off";
|
|
2598
2599
|
'import-x/no-unresolved': "off";
|
|
2600
|
+
'@typescript-eslint/strict-boolean-expressions': "error";
|
|
2599
2601
|
};
|
|
2600
2602
|
}, {
|
|
2601
2603
|
readonly languageOptions: {
|
package/dist/index.d.mts
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import * as eslint from 'eslint';
|
|
2
2
|
import { Linter } from 'eslint';
|
|
3
|
+
import nodePlugin from 'eslint-plugin-n';
|
|
3
4
|
|
|
4
5
|
type Config = Linter.Config;
|
|
5
6
|
type Plugin = NonNullable<Config['plugins']>[string];
|
|
6
7
|
type Parser = NonNullable<Config['languageOptions']>['parser'];
|
|
7
8
|
declare const core: [{
|
|
9
|
+
readonly rules: Readonly<eslint.Linter.RulesRecord>;
|
|
10
|
+
}, {
|
|
8
11
|
readonly name: "@rhyster/eslint-config/files-ts";
|
|
9
12
|
readonly files: ["**/*.ts"];
|
|
10
13
|
}, {
|
|
@@ -35,7 +38,7 @@ declare const core: [{
|
|
|
35
38
|
readonly 'import-x/ignore': readonly ["node_modules", "\\.(coffee|scss|css|less|hbs|svg|json)$"];
|
|
36
39
|
readonly 'import-x/external-module-folders': readonly ["node_modules", "node_modules/@types"];
|
|
37
40
|
};
|
|
38
|
-
}, {
|
|
41
|
+
}, ...Linter.Config<Linter.RulesRecord>[], {
|
|
39
42
|
name: string;
|
|
40
43
|
rules: {
|
|
41
44
|
'accessor-pairs': "off";
|
|
@@ -831,9 +834,12 @@ declare const core: [{
|
|
|
831
834
|
'import-x/default': "off";
|
|
832
835
|
'import-x/no-named-as-default-member': "off";
|
|
833
836
|
'import-x/no-unresolved': "off";
|
|
837
|
+
'@typescript-eslint/strict-boolean-expressions': "error";
|
|
834
838
|
};
|
|
835
839
|
}];
|
|
836
840
|
declare const node: [{
|
|
841
|
+
readonly rules: Readonly<eslint.Linter.RulesRecord>;
|
|
842
|
+
}, {
|
|
837
843
|
readonly name: "@rhyster/eslint-config/files-ts";
|
|
838
844
|
readonly files: ["**/*.ts"];
|
|
839
845
|
}, {
|
|
@@ -864,7 +870,7 @@ declare const node: [{
|
|
|
864
870
|
readonly 'import-x/ignore': readonly ["node_modules", "\\.(coffee|scss|css|less|hbs|svg|json)$"];
|
|
865
871
|
readonly 'import-x/external-module-folders': readonly ["node_modules", "node_modules/@types"];
|
|
866
872
|
};
|
|
867
|
-
}, {
|
|
873
|
+
}, ...Linter.Config<Linter.RulesRecord>[], {
|
|
868
874
|
name: string;
|
|
869
875
|
rules: {
|
|
870
876
|
'accessor-pairs': "off";
|
|
@@ -1660,6 +1666,7 @@ declare const node: [{
|
|
|
1660
1666
|
'import-x/default': "off";
|
|
1661
1667
|
'import-x/no-named-as-default-member': "off";
|
|
1662
1668
|
'import-x/no-unresolved': "off";
|
|
1669
|
+
'@typescript-eslint/strict-boolean-expressions': "error";
|
|
1663
1670
|
};
|
|
1664
1671
|
}, {
|
|
1665
1672
|
readonly name: string;
|
|
@@ -1757,19 +1764,13 @@ declare const node: [{
|
|
|
1757
1764
|
};
|
|
1758
1765
|
readonly plugins: {
|
|
1759
1766
|
readonly n: eslint.ESLint.Plugin & {
|
|
1760
|
-
configs:
|
|
1761
|
-
'recommended-module': eslint.ESLint.ConfigData;
|
|
1762
|
-
'recommended-script': eslint.ESLint.ConfigData;
|
|
1763
|
-
recommended: eslint.ESLint.ConfigData;
|
|
1764
|
-
'flat/recommended-module': eslint.Linter.FlatConfig;
|
|
1765
|
-
'flat/recommended-script': eslint.Linter.FlatConfig;
|
|
1766
|
-
'flat/recommended': eslint.Linter.FlatConfig;
|
|
1767
|
-
'flat/mixed-esm-and-cjs': eslint.Linter.FlatConfig[];
|
|
1768
|
-
};
|
|
1767
|
+
configs: nodePlugin.Configs;
|
|
1769
1768
|
};
|
|
1770
1769
|
};
|
|
1771
1770
|
}];
|
|
1772
1771
|
declare const browser: [{
|
|
1772
|
+
readonly rules: Readonly<eslint.Linter.RulesRecord>;
|
|
1773
|
+
}, {
|
|
1773
1774
|
readonly name: "@rhyster/eslint-config/files-ts";
|
|
1774
1775
|
readonly files: ["**/*.ts"];
|
|
1775
1776
|
}, {
|
|
@@ -1800,7 +1801,7 @@ declare const browser: [{
|
|
|
1800
1801
|
readonly 'import-x/ignore': readonly ["node_modules", "\\.(coffee|scss|css|less|hbs|svg|json)$"];
|
|
1801
1802
|
readonly 'import-x/external-module-folders': readonly ["node_modules", "node_modules/@types"];
|
|
1802
1803
|
};
|
|
1803
|
-
}, {
|
|
1804
|
+
}, ...Linter.Config<Linter.RulesRecord>[], {
|
|
1804
1805
|
name: string;
|
|
1805
1806
|
rules: {
|
|
1806
1807
|
'accessor-pairs': "off";
|
|
@@ -2596,6 +2597,7 @@ declare const browser: [{
|
|
|
2596
2597
|
'import-x/default': "off";
|
|
2597
2598
|
'import-x/no-named-as-default-member': "off";
|
|
2598
2599
|
'import-x/no-unresolved': "off";
|
|
2600
|
+
'@typescript-eslint/strict-boolean-expressions': "error";
|
|
2599
2601
|
};
|
|
2600
2602
|
}, {
|
|
2601
2603
|
readonly languageOptions: {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import * as eslint from 'eslint';
|
|
2
2
|
import { Linter } from 'eslint';
|
|
3
|
+
import nodePlugin from 'eslint-plugin-n';
|
|
3
4
|
|
|
4
5
|
type Config = Linter.Config;
|
|
5
6
|
type Plugin = NonNullable<Config['plugins']>[string];
|
|
6
7
|
type Parser = NonNullable<Config['languageOptions']>['parser'];
|
|
7
8
|
declare const core: [{
|
|
9
|
+
readonly rules: Readonly<eslint.Linter.RulesRecord>;
|
|
10
|
+
}, {
|
|
8
11
|
readonly name: "@rhyster/eslint-config/files-ts";
|
|
9
12
|
readonly files: ["**/*.ts"];
|
|
10
13
|
}, {
|
|
@@ -35,7 +38,7 @@ declare const core: [{
|
|
|
35
38
|
readonly 'import-x/ignore': readonly ["node_modules", "\\.(coffee|scss|css|less|hbs|svg|json)$"];
|
|
36
39
|
readonly 'import-x/external-module-folders': readonly ["node_modules", "node_modules/@types"];
|
|
37
40
|
};
|
|
38
|
-
}, {
|
|
41
|
+
}, ...Linter.Config<Linter.RulesRecord>[], {
|
|
39
42
|
name: string;
|
|
40
43
|
rules: {
|
|
41
44
|
'accessor-pairs': "off";
|
|
@@ -831,9 +834,12 @@ declare const core: [{
|
|
|
831
834
|
'import-x/default': "off";
|
|
832
835
|
'import-x/no-named-as-default-member': "off";
|
|
833
836
|
'import-x/no-unresolved': "off";
|
|
837
|
+
'@typescript-eslint/strict-boolean-expressions': "error";
|
|
834
838
|
};
|
|
835
839
|
}];
|
|
836
840
|
declare const node: [{
|
|
841
|
+
readonly rules: Readonly<eslint.Linter.RulesRecord>;
|
|
842
|
+
}, {
|
|
837
843
|
readonly name: "@rhyster/eslint-config/files-ts";
|
|
838
844
|
readonly files: ["**/*.ts"];
|
|
839
845
|
}, {
|
|
@@ -864,7 +870,7 @@ declare const node: [{
|
|
|
864
870
|
readonly 'import-x/ignore': readonly ["node_modules", "\\.(coffee|scss|css|less|hbs|svg|json)$"];
|
|
865
871
|
readonly 'import-x/external-module-folders': readonly ["node_modules", "node_modules/@types"];
|
|
866
872
|
};
|
|
867
|
-
}, {
|
|
873
|
+
}, ...Linter.Config<Linter.RulesRecord>[], {
|
|
868
874
|
name: string;
|
|
869
875
|
rules: {
|
|
870
876
|
'accessor-pairs': "off";
|
|
@@ -1660,6 +1666,7 @@ declare const node: [{
|
|
|
1660
1666
|
'import-x/default': "off";
|
|
1661
1667
|
'import-x/no-named-as-default-member': "off";
|
|
1662
1668
|
'import-x/no-unresolved': "off";
|
|
1669
|
+
'@typescript-eslint/strict-boolean-expressions': "error";
|
|
1663
1670
|
};
|
|
1664
1671
|
}, {
|
|
1665
1672
|
readonly name: string;
|
|
@@ -1757,19 +1764,13 @@ declare const node: [{
|
|
|
1757
1764
|
};
|
|
1758
1765
|
readonly plugins: {
|
|
1759
1766
|
readonly n: eslint.ESLint.Plugin & {
|
|
1760
|
-
configs:
|
|
1761
|
-
'recommended-module': eslint.ESLint.ConfigData;
|
|
1762
|
-
'recommended-script': eslint.ESLint.ConfigData;
|
|
1763
|
-
recommended: eslint.ESLint.ConfigData;
|
|
1764
|
-
'flat/recommended-module': eslint.Linter.FlatConfig;
|
|
1765
|
-
'flat/recommended-script': eslint.Linter.FlatConfig;
|
|
1766
|
-
'flat/recommended': eslint.Linter.FlatConfig;
|
|
1767
|
-
'flat/mixed-esm-and-cjs': eslint.Linter.FlatConfig[];
|
|
1768
|
-
};
|
|
1767
|
+
configs: nodePlugin.Configs;
|
|
1769
1768
|
};
|
|
1770
1769
|
};
|
|
1771
1770
|
}];
|
|
1772
1771
|
declare const browser: [{
|
|
1772
|
+
readonly rules: Readonly<eslint.Linter.RulesRecord>;
|
|
1773
|
+
}, {
|
|
1773
1774
|
readonly name: "@rhyster/eslint-config/files-ts";
|
|
1774
1775
|
readonly files: ["**/*.ts"];
|
|
1775
1776
|
}, {
|
|
@@ -1800,7 +1801,7 @@ declare const browser: [{
|
|
|
1800
1801
|
readonly 'import-x/ignore': readonly ["node_modules", "\\.(coffee|scss|css|less|hbs|svg|json)$"];
|
|
1801
1802
|
readonly 'import-x/external-module-folders': readonly ["node_modules", "node_modules/@types"];
|
|
1802
1803
|
};
|
|
1803
|
-
}, {
|
|
1804
|
+
}, ...Linter.Config<Linter.RulesRecord>[], {
|
|
1804
1805
|
name: string;
|
|
1805
1806
|
rules: {
|
|
1806
1807
|
'accessor-pairs': "off";
|
|
@@ -2596,6 +2597,7 @@ declare const browser: [{
|
|
|
2596
2597
|
'import-x/default': "off";
|
|
2597
2598
|
'import-x/no-named-as-default-member': "off";
|
|
2598
2599
|
'import-x/no-unresolved': "off";
|
|
2600
|
+
'@typescript-eslint/strict-boolean-expressions': "error";
|
|
2599
2601
|
};
|
|
2600
2602
|
}, {
|
|
2601
2603
|
readonly languageOptions: {
|
package/dist/index.mjs
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
|
import confusingBrowserGlobals from 'confusing-browser-globals';
|
|
7
8
|
|
|
8
9
|
const bestPractices = {
|
|
@@ -1802,19 +1803,21 @@ const typescript = {
|
|
|
1802
1803
|
"import-x/namespace": "off",
|
|
1803
1804
|
"import-x/default": "off",
|
|
1804
1805
|
"import-x/no-named-as-default-member": "off",
|
|
1805
|
-
"import-x/no-unresolved": "off"
|
|
1806
|
+
"import-x/no-unresolved": "off",
|
|
1807
|
+
// https://typescript-eslint.io/rules/strict-boolean-expressions/
|
|
1808
|
+
"@typescript-eslint/strict-boolean-expressions": "error"
|
|
1806
1809
|
}
|
|
1807
1810
|
};
|
|
1808
1811
|
|
|
1809
1812
|
const general = {
|
|
1810
1813
|
name: "@rhyster/eslint-config/airbnb/general",
|
|
1811
1814
|
plugins: {
|
|
1812
|
-
"@typescript-eslint":
|
|
1815
|
+
"@typescript-eslint": ts.plugin,
|
|
1813
1816
|
"@stylistic": stylistic,
|
|
1814
1817
|
"import-x": importx
|
|
1815
1818
|
},
|
|
1816
1819
|
languageOptions: {
|
|
1817
|
-
parser:
|
|
1820
|
+
parser: ts.parser,
|
|
1818
1821
|
parserOptions: {
|
|
1819
1822
|
projectService: true
|
|
1820
1823
|
}
|
|
@@ -1859,11 +1862,14 @@ const general = {
|
|
|
1859
1862
|
}
|
|
1860
1863
|
};
|
|
1861
1864
|
const core = [
|
|
1865
|
+
js.configs.recommended,
|
|
1862
1866
|
{
|
|
1863
1867
|
name: "@rhyster/eslint-config/files-ts",
|
|
1864
1868
|
files: ["**/*.ts"]
|
|
1865
1869
|
},
|
|
1866
1870
|
general,
|
|
1871
|
+
...ts.configs.strictTypeChecked,
|
|
1872
|
+
...ts.configs.stylisticTypeChecked,
|
|
1867
1873
|
bestPractices,
|
|
1868
1874
|
errors,
|
|
1869
1875
|
style,
|