@rhyster/eslint-config 1.1.0 → 1.3.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 +2 -1
- package/dist/eslint.config.d.ts.map +1 -1
- package/dist/index.cjs +8 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -12
- package/dist/index.d.mts +8 -12
- package/dist/index.d.ts +8 -12
- package/dist/index.mjs +8 -2
- package/dist/index.mjs.map +1 -1
- package/dist/src/airbnb/errors.d.ts.map +1 -1
- package/dist/src/index.d.ts +8 -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 +9 -9
- package/src/airbnb/errors.ts +5 -1
- package/src/typescript.ts +3 -0
package/dist/index.d.cts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
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: [{
|
|
8
|
-
readonly rules: Readonly<
|
|
9
|
+
readonly rules: Readonly<Linter.RulesRecord>;
|
|
9
10
|
}, {
|
|
10
11
|
readonly name: "@rhyster/eslint-config/files-ts";
|
|
11
12
|
readonly files: ["**/*.ts"];
|
|
@@ -833,10 +834,11 @@ declare const core: [{
|
|
|
833
834
|
'import-x/default': "off";
|
|
834
835
|
'import-x/no-named-as-default-member': "off";
|
|
835
836
|
'import-x/no-unresolved': "off";
|
|
837
|
+
'@typescript-eslint/strict-boolean-expressions': "error";
|
|
836
838
|
};
|
|
837
839
|
}];
|
|
838
840
|
declare const node: [{
|
|
839
|
-
readonly rules: Readonly<
|
|
841
|
+
readonly rules: Readonly<Linter.RulesRecord>;
|
|
840
842
|
}, {
|
|
841
843
|
readonly name: "@rhyster/eslint-config/files-ts";
|
|
842
844
|
readonly files: ["**/*.ts"];
|
|
@@ -1664,6 +1666,7 @@ declare const node: [{
|
|
|
1664
1666
|
'import-x/default': "off";
|
|
1665
1667
|
'import-x/no-named-as-default-member': "off";
|
|
1666
1668
|
'import-x/no-unresolved': "off";
|
|
1669
|
+
'@typescript-eslint/strict-boolean-expressions': "error";
|
|
1667
1670
|
};
|
|
1668
1671
|
}, {
|
|
1669
1672
|
readonly name: string;
|
|
@@ -1761,20 +1764,12 @@ declare const node: [{
|
|
|
1761
1764
|
};
|
|
1762
1765
|
readonly plugins: {
|
|
1763
1766
|
readonly n: eslint.ESLint.Plugin & {
|
|
1764
|
-
configs:
|
|
1765
|
-
'recommended-module': eslint.ESLint.ConfigData;
|
|
1766
|
-
'recommended-script': eslint.ESLint.ConfigData;
|
|
1767
|
-
recommended: eslint.ESLint.ConfigData;
|
|
1768
|
-
'flat/recommended-module': eslint.Linter.FlatConfig;
|
|
1769
|
-
'flat/recommended-script': eslint.Linter.FlatConfig;
|
|
1770
|
-
'flat/recommended': eslint.Linter.FlatConfig;
|
|
1771
|
-
'flat/mixed-esm-and-cjs': eslint.Linter.FlatConfig[];
|
|
1772
|
-
};
|
|
1767
|
+
configs: nodePlugin.Configs;
|
|
1773
1768
|
};
|
|
1774
1769
|
};
|
|
1775
1770
|
}];
|
|
1776
1771
|
declare const browser: [{
|
|
1777
|
-
readonly rules: Readonly<
|
|
1772
|
+
readonly rules: Readonly<Linter.RulesRecord>;
|
|
1778
1773
|
}, {
|
|
1779
1774
|
readonly name: "@rhyster/eslint-config/files-ts";
|
|
1780
1775
|
readonly files: ["**/*.ts"];
|
|
@@ -2602,6 +2597,7 @@ declare const browser: [{
|
|
|
2602
2597
|
'import-x/default': "off";
|
|
2603
2598
|
'import-x/no-named-as-default-member': "off";
|
|
2604
2599
|
'import-x/no-unresolved': "off";
|
|
2600
|
+
'@typescript-eslint/strict-boolean-expressions': "error";
|
|
2605
2601
|
};
|
|
2606
2602
|
}, {
|
|
2607
2603
|
readonly languageOptions: {
|
package/dist/index.d.mts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
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: [{
|
|
8
|
-
readonly rules: Readonly<
|
|
9
|
+
readonly rules: Readonly<Linter.RulesRecord>;
|
|
9
10
|
}, {
|
|
10
11
|
readonly name: "@rhyster/eslint-config/files-ts";
|
|
11
12
|
readonly files: ["**/*.ts"];
|
|
@@ -833,10 +834,11 @@ declare const core: [{
|
|
|
833
834
|
'import-x/default': "off";
|
|
834
835
|
'import-x/no-named-as-default-member': "off";
|
|
835
836
|
'import-x/no-unresolved': "off";
|
|
837
|
+
'@typescript-eslint/strict-boolean-expressions': "error";
|
|
836
838
|
};
|
|
837
839
|
}];
|
|
838
840
|
declare const node: [{
|
|
839
|
-
readonly rules: Readonly<
|
|
841
|
+
readonly rules: Readonly<Linter.RulesRecord>;
|
|
840
842
|
}, {
|
|
841
843
|
readonly name: "@rhyster/eslint-config/files-ts";
|
|
842
844
|
readonly files: ["**/*.ts"];
|
|
@@ -1664,6 +1666,7 @@ declare const node: [{
|
|
|
1664
1666
|
'import-x/default': "off";
|
|
1665
1667
|
'import-x/no-named-as-default-member': "off";
|
|
1666
1668
|
'import-x/no-unresolved': "off";
|
|
1669
|
+
'@typescript-eslint/strict-boolean-expressions': "error";
|
|
1667
1670
|
};
|
|
1668
1671
|
}, {
|
|
1669
1672
|
readonly name: string;
|
|
@@ -1761,20 +1764,12 @@ declare const node: [{
|
|
|
1761
1764
|
};
|
|
1762
1765
|
readonly plugins: {
|
|
1763
1766
|
readonly n: eslint.ESLint.Plugin & {
|
|
1764
|
-
configs:
|
|
1765
|
-
'recommended-module': eslint.ESLint.ConfigData;
|
|
1766
|
-
'recommended-script': eslint.ESLint.ConfigData;
|
|
1767
|
-
recommended: eslint.ESLint.ConfigData;
|
|
1768
|
-
'flat/recommended-module': eslint.Linter.FlatConfig;
|
|
1769
|
-
'flat/recommended-script': eslint.Linter.FlatConfig;
|
|
1770
|
-
'flat/recommended': eslint.Linter.FlatConfig;
|
|
1771
|
-
'flat/mixed-esm-and-cjs': eslint.Linter.FlatConfig[];
|
|
1772
|
-
};
|
|
1767
|
+
configs: nodePlugin.Configs;
|
|
1773
1768
|
};
|
|
1774
1769
|
};
|
|
1775
1770
|
}];
|
|
1776
1771
|
declare const browser: [{
|
|
1777
|
-
readonly rules: Readonly<
|
|
1772
|
+
readonly rules: Readonly<Linter.RulesRecord>;
|
|
1778
1773
|
}, {
|
|
1779
1774
|
readonly name: "@rhyster/eslint-config/files-ts";
|
|
1780
1775
|
readonly files: ["**/*.ts"];
|
|
@@ -2602,6 +2597,7 @@ declare const browser: [{
|
|
|
2602
2597
|
'import-x/default': "off";
|
|
2603
2598
|
'import-x/no-named-as-default-member': "off";
|
|
2604
2599
|
'import-x/no-unresolved': "off";
|
|
2600
|
+
'@typescript-eslint/strict-boolean-expressions': "error";
|
|
2605
2601
|
};
|
|
2606
2602
|
}, {
|
|
2607
2603
|
readonly languageOptions: {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
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: [{
|
|
8
|
-
readonly rules: Readonly<
|
|
9
|
+
readonly rules: Readonly<Linter.RulesRecord>;
|
|
9
10
|
}, {
|
|
10
11
|
readonly name: "@rhyster/eslint-config/files-ts";
|
|
11
12
|
readonly files: ["**/*.ts"];
|
|
@@ -833,10 +834,11 @@ declare const core: [{
|
|
|
833
834
|
'import-x/default': "off";
|
|
834
835
|
'import-x/no-named-as-default-member': "off";
|
|
835
836
|
'import-x/no-unresolved': "off";
|
|
837
|
+
'@typescript-eslint/strict-boolean-expressions': "error";
|
|
836
838
|
};
|
|
837
839
|
}];
|
|
838
840
|
declare const node: [{
|
|
839
|
-
readonly rules: Readonly<
|
|
841
|
+
readonly rules: Readonly<Linter.RulesRecord>;
|
|
840
842
|
}, {
|
|
841
843
|
readonly name: "@rhyster/eslint-config/files-ts";
|
|
842
844
|
readonly files: ["**/*.ts"];
|
|
@@ -1664,6 +1666,7 @@ declare const node: [{
|
|
|
1664
1666
|
'import-x/default': "off";
|
|
1665
1667
|
'import-x/no-named-as-default-member': "off";
|
|
1666
1668
|
'import-x/no-unresolved': "off";
|
|
1669
|
+
'@typescript-eslint/strict-boolean-expressions': "error";
|
|
1667
1670
|
};
|
|
1668
1671
|
}, {
|
|
1669
1672
|
readonly name: string;
|
|
@@ -1761,20 +1764,12 @@ declare const node: [{
|
|
|
1761
1764
|
};
|
|
1762
1765
|
readonly plugins: {
|
|
1763
1766
|
readonly n: eslint.ESLint.Plugin & {
|
|
1764
|
-
configs:
|
|
1765
|
-
'recommended-module': eslint.ESLint.ConfigData;
|
|
1766
|
-
'recommended-script': eslint.ESLint.ConfigData;
|
|
1767
|
-
recommended: eslint.ESLint.ConfigData;
|
|
1768
|
-
'flat/recommended-module': eslint.Linter.FlatConfig;
|
|
1769
|
-
'flat/recommended-script': eslint.Linter.FlatConfig;
|
|
1770
|
-
'flat/recommended': eslint.Linter.FlatConfig;
|
|
1771
|
-
'flat/mixed-esm-and-cjs': eslint.Linter.FlatConfig[];
|
|
1772
|
-
};
|
|
1767
|
+
configs: nodePlugin.Configs;
|
|
1773
1768
|
};
|
|
1774
1769
|
};
|
|
1775
1770
|
}];
|
|
1776
1771
|
declare const browser: [{
|
|
1777
|
-
readonly rules: Readonly<
|
|
1772
|
+
readonly rules: Readonly<Linter.RulesRecord>;
|
|
1778
1773
|
}, {
|
|
1779
1774
|
readonly name: "@rhyster/eslint-config/files-ts";
|
|
1780
1775
|
readonly files: ["**/*.ts"];
|
|
@@ -2602,6 +2597,7 @@ declare const browser: [{
|
|
|
2602
2597
|
'import-x/default': "off";
|
|
2603
2598
|
'import-x/no-named-as-default-member': "off";
|
|
2604
2599
|
'import-x/no-unresolved': "off";
|
|
2600
|
+
'@typescript-eslint/strict-boolean-expressions': "error";
|
|
2605
2601
|
};
|
|
2606
2602
|
}, {
|
|
2607
2603
|
readonly languageOptions: {
|
package/dist/index.mjs
CHANGED
|
@@ -438,7 +438,11 @@ const errors = {
|
|
|
438
438
|
"no-console": [
|
|
439
439
|
"error",
|
|
440
440
|
{
|
|
441
|
-
allow: [
|
|
441
|
+
allow: [
|
|
442
|
+
"info",
|
|
443
|
+
"warn",
|
|
444
|
+
"error"
|
|
445
|
+
]
|
|
442
446
|
}
|
|
443
447
|
],
|
|
444
448
|
// Disallows expressions where the operation doesn't affect the value
|
|
@@ -1803,7 +1807,9 @@ const typescript = {
|
|
|
1803
1807
|
"import-x/namespace": "off",
|
|
1804
1808
|
"import-x/default": "off",
|
|
1805
1809
|
"import-x/no-named-as-default-member": "off",
|
|
1806
|
-
"import-x/no-unresolved": "off"
|
|
1810
|
+
"import-x/no-unresolved": "off",
|
|
1811
|
+
// https://typescript-eslint.io/rules/strict-boolean-expressions/
|
|
1812
|
+
"@typescript-eslint/strict-boolean-expressions": "error"
|
|
1807
1813
|
}
|
|
1808
1814
|
};
|
|
1809
1815
|
|