@snowyyd/eslint-config 2.2.4 → 2.2.6

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/esm.js CHANGED
@@ -11,7 +11,9 @@ export default (plugin, parser) => [
11
11
  // extensions are mandatory in ESM
12
12
  'import-x/extensions': ['error', 'ignorePackages'],
13
13
  'no-restricted-globals': [
14
- ...shared.rules['no-restricted-globals'],
14
+ 'error',
15
+ // TODO: hacky
16
+ ...shared.rules['no-restricted-globals'].splice(1),
15
17
  // __dirname & __filename cannot be used in ESM
16
18
  {
17
19
  name: '__dirname',
package/dist/index.d.ts CHANGED
@@ -1,19 +1,20 @@
1
+ import type { CompatibleConfigArray } from './types.ts';
1
2
  export declare const configs: {
2
- recommended: import("@typescript-eslint/utils/ts-eslint").FlatConfig.ConfigArray;
3
- esm: import("@typescript-eslint/utils/ts-eslint").FlatConfig.ConfigArray;
4
- airbnb: import("@typescript-eslint/utils/ts-eslint").FlatConfig.ConfigArray;
5
- airbnbTs: import("@typescript-eslint/utils/ts-eslint").FlatConfig.ConfigArray;
6
- personal: import("@typescript-eslint/utils/ts-eslint").FlatConfig.ConfigArray;
7
- typescript: import("@typescript-eslint/utils/ts-eslint").FlatConfig.ConfigArray;
3
+ recommended: CompatibleConfigArray;
4
+ esm: CompatibleConfigArray;
5
+ airbnb: CompatibleConfigArray;
6
+ airbnbTs: CompatibleConfigArray;
7
+ personal: CompatibleConfigArray;
8
+ typescript: CompatibleConfigArray;
8
9
  };
9
10
  declare const _default: {
10
11
  configs: {
11
- recommended: import("@typescript-eslint/utils/ts-eslint").FlatConfig.ConfigArray;
12
- esm: import("@typescript-eslint/utils/ts-eslint").FlatConfig.ConfigArray;
13
- airbnb: import("@typescript-eslint/utils/ts-eslint").FlatConfig.ConfigArray;
14
- airbnbTs: import("@typescript-eslint/utils/ts-eslint").FlatConfig.ConfigArray;
15
- personal: import("@typescript-eslint/utils/ts-eslint").FlatConfig.ConfigArray;
16
- typescript: import("@typescript-eslint/utils/ts-eslint").FlatConfig.ConfigArray;
12
+ recommended: CompatibleConfigArray;
13
+ esm: CompatibleConfigArray;
14
+ airbnb: CompatibleConfigArray;
15
+ airbnbTs: CompatibleConfigArray;
16
+ personal: CompatibleConfigArray;
17
+ typescript: CompatibleConfigArray;
17
18
  };
18
19
  };
19
20
  export default _default;
@@ -1,175 +1,3 @@
1
- declare const _default: {
2
- name: string;
3
- rules: {
4
- 'accessor-pairs': "off";
5
- 'array-callback-return': ["error", {
6
- allowImplicit: boolean;
7
- }];
8
- 'block-scoped-var': "error";
9
- complexity: ["off", number];
10
- 'class-methods-use-this': ["error", {
11
- exceptMethods: never[];
12
- }];
13
- 'consistent-return': "error";
14
- curly: ["error", string];
15
- 'default-case': ["error", {
16
- commentPattern: string;
17
- }];
18
- 'default-case-last': "error";
19
- 'default-param-last': "error";
20
- 'dot-notation': ["error", {
21
- allowKeywords: boolean;
22
- }];
23
- '@stylistic/dot-location': ["error", string];
24
- eqeqeq: ["error", string, {
25
- null: string;
26
- }];
27
- 'grouped-accessor-pairs': "error";
28
- 'guard-for-in': "error";
29
- 'max-classes-per-file': ["error", number];
30
- 'no-alert': "warn";
31
- 'no-caller': "error";
32
- 'no-case-declarations': "error";
33
- 'no-constructor-return': "error";
34
- 'no-div-regex': "off";
35
- 'no-else-return': ["error", {
36
- allowElseIf: boolean;
37
- }];
38
- 'no-empty-function': ["error", {
39
- allow: string[];
40
- }];
41
- 'no-empty-pattern': "error";
42
- 'no-empty-static-block': "off";
43
- 'no-eq-null': "off";
44
- 'no-eval': "error";
45
- 'no-extend-native': "error";
46
- 'no-extra-bind': "error";
47
- 'no-extra-label': "error";
48
- 'no-fallthrough': "error";
49
- '@stylistic/no-floating-decimal': "error";
50
- 'no-global-assign': ["error", {
51
- exceptions: never[];
52
- }];
53
- 'no-implicit-coercion': ["off", {
54
- boolean: boolean;
55
- number: boolean;
56
- string: boolean;
57
- allow: never[];
58
- }];
59
- 'no-implicit-globals': "off";
60
- 'no-implied-eval': "error";
61
- 'no-invalid-this': "off";
62
- 'no-iterator': "error";
63
- 'no-labels': ["error", {
64
- allowLoop: boolean;
65
- allowSwitch: boolean;
66
- }];
67
- 'no-lone-blocks': "error";
68
- 'no-loop-func': "error";
69
- 'no-magic-numbers': ["off", {
70
- ignore: never[];
71
- ignoreArrayIndexes: boolean;
72
- enforceConst: boolean;
73
- detectObjects: boolean;
74
- }];
75
- '@stylistic/no-multi-spaces': ["error", {
76
- ignoreEOLComments: boolean;
77
- }];
78
- 'no-multi-str': "error";
79
- 'no-new': "error";
80
- 'no-new-func': "error";
81
- 'no-new-wrappers': "error";
82
- 'no-nonoctal-decimal-escape': "error";
83
- 'no-object-constructor': "error";
84
- 'no-octal': "error";
85
- 'no-octal-escape': "error";
86
- 'no-param-reassign': ["error", {
87
- props: boolean;
88
- ignorePropertyModificationsFor: string[];
89
- }];
90
- 'no-proto': "error";
91
- 'no-redeclare': "error";
92
- 'no-restricted-properties': ["error", {
93
- object: string;
94
- property: string;
95
- message: string;
96
- }, {
97
- object: string;
98
- property: string;
99
- message: string;
100
- }, {
101
- object: string;
102
- property: string;
103
- message: string;
104
- }, {
105
- object: string;
106
- property: string;
107
- message: string;
108
- }, {
109
- object: string;
110
- property: string;
111
- message: string;
112
- }, {
113
- object: string;
114
- property: string;
115
- message: string;
116
- }, {
117
- object: string;
118
- property: string;
119
- message: string;
120
- }, {
121
- property: string;
122
- message: string;
123
- }, {
124
- property: string;
125
- message: string;
126
- }, {
127
- object: string;
128
- property: string;
129
- message: string;
130
- }];
131
- 'no-return-assign': ["error", string];
132
- 'no-script-url': "error";
133
- 'no-self-assign': ["error", {
134
- props: boolean;
135
- }];
136
- 'no-self-compare': "error";
137
- 'no-sequences': "error";
138
- 'no-throw-literal': "error";
139
- 'no-unmodified-loop-condition': "off";
140
- 'no-unused-expressions': ["error", {
141
- allowShortCircuit: boolean;
142
- allowTernary: boolean;
143
- allowTaggedTemplates: boolean;
144
- }];
145
- 'no-unused-labels': "error";
146
- 'no-useless-call': "off";
147
- 'no-useless-catch': "error";
148
- 'no-useless-concat': "error";
149
- 'no-useless-escape': "error";
150
- 'no-useless-return': "error";
151
- 'no-void': "error";
152
- 'no-warning-comments': ["off", {
153
- terms: string[];
154
- location: string;
155
- }];
156
- 'no-with': "error";
157
- 'prefer-promise-reject-errors': ["error", {
158
- allowEmptyReject: boolean;
159
- }];
160
- 'prefer-named-capture-group': "off";
161
- 'prefer-object-has-own': "off";
162
- 'prefer-regex-literals': ["error", {
163
- disallowRedundantWrapping: boolean;
164
- }];
165
- radix: "error";
166
- 'require-await': "off";
167
- 'require-unicode-regexp': "off";
168
- 'vars-on-top': "error";
169
- '@stylistic/wrap-iife': ["error", string, {
170
- functionPrototypeMethods: boolean;
171
- }];
172
- yoda: "error";
173
- };
174
- };
175
- export default _default;
1
+ import type { FlatConfig } from '@typescript-eslint/utils/ts-eslint';
2
+ declare const config: FlatConfig.Config;
3
+ export default config;
@@ -1,4 +1,4 @@
1
- export default {
1
+ const config = {
2
2
  name: '@snowyyd/eslint-config-x/rules/airbnb-base/best-practices',
3
3
  rules: {
4
4
  'accessor-pairs': 'off',
@@ -162,3 +162,4 @@ export default {
162
162
  yoda: 'error',
163
163
  },
164
164
  };
165
+ export default config;
@@ -1,66 +1,3 @@
1
- declare const _default: {
2
- name: string;
3
- rules: {
4
- 'for-direction': "error";
5
- 'getter-return': ["error", {
6
- allowImplicit: boolean;
7
- }];
8
- 'no-async-promise-executor': "error";
9
- 'no-await-in-loop': "error";
10
- 'no-compare-neg-zero': "error";
11
- 'no-cond-assign': ["error", string];
12
- 'no-console': "warn";
13
- 'no-constant-binary-expression': "off";
14
- 'no-constant-condition': "warn";
15
- 'no-control-regex': "error";
16
- 'no-debugger': "error";
17
- 'no-dupe-args': "error";
18
- 'no-dupe-else-if': "error";
19
- 'no-dupe-keys': "error";
20
- 'no-duplicate-case': "error";
21
- 'no-empty': "error";
22
- 'no-empty-character-class': "error";
23
- 'no-ex-assign': "error";
24
- 'no-extra-boolean-cast': "error";
25
- '@stylistic/no-extra-parens': ["off", string, {
26
- conditionalAssign: boolean;
27
- nestedBinaryExpressions: boolean;
28
- returnAssign: boolean;
29
- ignoreJSX: string;
30
- enforceForArrowConditionals: boolean;
31
- }];
32
- '@stylistic/no-extra-semi': "error";
33
- 'no-func-assign': "error";
34
- 'no-import-assign': "error";
35
- 'no-inner-declarations': "error";
36
- 'no-invalid-regexp': "error";
37
- 'no-irregular-whitespace': "error";
38
- 'no-loss-of-precision': "error";
39
- 'no-misleading-character-class': "error";
40
- 'no-obj-calls': "error";
41
- 'no-promise-executor-return': "error";
42
- 'no-prototype-builtins': "error";
43
- 'no-regex-spaces': "error";
44
- 'no-setter-return': "error";
45
- 'no-sparse-arrays': "error";
46
- 'no-template-curly-in-string': "error";
47
- 'no-unexpected-multiline': "error";
48
- 'no-unreachable': "error";
49
- 'no-unreachable-loop': ["error", {
50
- ignore: never[];
51
- }];
52
- 'no-unsafe-finally': "error";
53
- 'no-unsafe-negation': "error";
54
- 'no-unsafe-optional-chaining': ["error", {
55
- disallowArithmeticOperators: boolean;
56
- }];
57
- 'no-unused-private-class-members': "off";
58
- 'no-useless-backreference': "error";
59
- 'require-atomic-updates': "off";
60
- 'use-isnan': "error";
61
- 'valid-typeof': ["error", {
62
- requireStringLiterals: boolean;
63
- }];
64
- };
65
- };
66
- export default _default;
1
+ import type { FlatConfig } from '@typescript-eslint/utils/ts-eslint';
2
+ declare const config: FlatConfig.Config;
3
+ export default config;
@@ -1,4 +1,4 @@
1
- export default {
1
+ const config = {
2
2
  name: '@snowyyd/eslint-config-x/rules/airbnb-base/errors',
3
3
  rules: {
4
4
  'for-direction': 'error',
@@ -60,3 +60,4 @@ export default {
60
60
  'valid-typeof': ['error', { requireStringLiterals: true }],
61
61
  },
62
62
  };
63
+ export default config;
@@ -1,145 +1,3 @@
1
- declare const _default: {
2
- name: string;
3
- languageOptions: {
4
- ecmaVersion: 6;
5
- sourceType: "module";
6
- globals: {
7
- Array: false;
8
- ArrayBuffer: false;
9
- Boolean: false;
10
- DataView: false;
11
- Date: false;
12
- decodeURI: false;
13
- decodeURIComponent: false;
14
- encodeURI: false;
15
- encodeURIComponent: false;
16
- Error: false;
17
- escape: false;
18
- eval: false;
19
- EvalError: false;
20
- Float32Array: false;
21
- Float64Array: false;
22
- Function: false;
23
- Infinity: false;
24
- Int16Array: false;
25
- Int32Array: false;
26
- Int8Array: false;
27
- Intl: false;
28
- isFinite: false;
29
- isNaN: false;
30
- JSON: false;
31
- Map: false;
32
- Math: false;
33
- NaN: false;
34
- Number: false;
35
- Object: false;
36
- parseFloat: false;
37
- parseInt: false;
38
- Promise: false;
39
- Proxy: false;
40
- RangeError: false;
41
- ReferenceError: false;
42
- Reflect: false;
43
- RegExp: false;
44
- Set: false;
45
- String: false;
46
- Symbol: false;
47
- SyntaxError: false;
48
- TypeError: false;
49
- Uint16Array: false;
50
- Uint32Array: false;
51
- Uint8Array: false;
52
- Uint8ClampedArray: false;
53
- undefined: false;
54
- unescape: false;
55
- URIError: false;
56
- WeakMap: false;
57
- WeakSet: false;
58
- };
59
- parserOptions: {
60
- ecmaFeatures: {
61
- generators: boolean;
62
- objectLiteralDuplicateProperties: boolean;
63
- };
64
- };
65
- };
66
- rules: {
67
- 'arrow-body-style': ["error", string, {
68
- requireReturnForObjectLiteral: boolean;
69
- }];
70
- '@stylistic/arrow-parens': ["error", string];
71
- '@stylistic/arrow-spacing': ["error", {
72
- before: boolean;
73
- after: boolean;
74
- }];
75
- 'constructor-super': "error";
76
- '@stylistic/generator-star-spacing': ["error", {
77
- before: boolean;
78
- after: boolean;
79
- }];
80
- 'no-class-assign': "error";
81
- '@stylistic/no-confusing-arrow': ["error", {
82
- allowParens: boolean;
83
- }];
84
- 'no-const-assign': "error";
85
- 'no-dupe-class-members': "error";
86
- 'no-duplicate-imports': "off";
87
- 'no-new-native-nonconstructor': "error";
88
- 'no-restricted-exports': ["error", {
89
- restrictedNamedExports: string[];
90
- }];
91
- 'no-restricted-imports': ["off", {
92
- paths: never[];
93
- patterns: never[];
94
- }];
95
- 'no-this-before-super': "error";
96
- 'no-useless-computed-key': "error";
97
- 'no-useless-constructor': "error";
98
- 'no-useless-rename': ["error", {
99
- ignoreDestructuring: boolean;
100
- ignoreImport: boolean;
101
- ignoreExport: boolean;
102
- }];
103
- 'no-var': "error";
104
- 'object-shorthand': ["error", string, {
105
- ignoreConstructors: boolean;
106
- avoidQuotes: boolean;
107
- }];
108
- 'prefer-arrow-callback': ["error", {
109
- allowNamedFunctions: boolean;
110
- allowUnboundThis: boolean;
111
- }];
112
- 'prefer-const': ["error", {
113
- destructuring: string;
114
- ignoreReadBeforeAssign: boolean;
115
- }];
116
- 'prefer-destructuring': ["error", {
117
- VariableDeclarator: {
118
- array: boolean;
119
- object: boolean;
120
- };
121
- AssignmentExpression: {
122
- array: boolean;
123
- object: boolean;
124
- };
125
- }, {
126
- enforceForRenamedProperties: boolean;
127
- }];
128
- 'prefer-numeric-literals': "error";
129
- 'prefer-rest-params': "error";
130
- 'prefer-spread': "error";
131
- 'prefer-template': "error";
132
- 'require-yield': "error";
133
- '@stylistic/rest-spread-spacing': ["error", string];
134
- 'sort-imports': ["off", {
135
- ignoreCase: boolean;
136
- ignoreDeclarationSort: boolean;
137
- ignoreMemberSort: boolean;
138
- memberSyntaxSortOrder: string[];
139
- }];
140
- 'symbol-description': "error";
141
- '@stylistic/template-curly-spacing': "error";
142
- '@stylistic/yield-star-spacing': ["error", string];
143
- };
144
- };
145
- export default _default;
1
+ import type { FlatConfig } from '@typescript-eslint/utils/ts-eslint';
2
+ declare const config: FlatConfig.Config;
3
+ export default config;
@@ -1,5 +1,5 @@
1
1
  import globals from 'globals';
2
- export default {
2
+ const config = {
3
3
  name: '@snowyyd/eslint-config-x/rules/airbnb-base/es6',
4
4
  languageOptions: {
5
5
  ecmaVersion: 6,
@@ -83,3 +83,4 @@ export default {
83
83
  '@stylistic/yield-star-spacing': ['error', 'after'],
84
84
  },
85
85
  };
86
+ export default config;