@isentinel/eslint-config 6.0.0-beta.27 → 6.0.0-beta.29
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/cli.mjs +1 -1
- package/dist/index.d.mts +24 -24
- package/dist/index.mjs +2 -1
- package/dist/lint-cli.mjs +1 -1
- package/dist/oxlint.d.mts +32 -21
- package/dist/oxlint.mjs +174 -55
- package/package.json +3 -3
package/dist/cli.mjs
CHANGED
|
@@ -9,7 +9,7 @@ import path from "node:path";
|
|
|
9
9
|
import { existsSync, readFileSync } from "fs";
|
|
10
10
|
import { execSync } from "node:child_process";
|
|
11
11
|
//#region package.json
|
|
12
|
-
var version = "6.0.0-beta.
|
|
12
|
+
var version = "6.0.0-beta.29";
|
|
13
13
|
var package_default = {
|
|
14
14
|
name: "@isentinel/eslint-config",
|
|
15
15
|
version,
|
package/dist/index.d.mts
CHANGED
|
@@ -478,7 +478,7 @@ interface JsoncRuleDefaults {
|
|
|
478
478
|
"*": "off";
|
|
479
479
|
};
|
|
480
480
|
"sonar/no-dead-store": {
|
|
481
|
-
"*": "
|
|
481
|
+
"*": "off";
|
|
482
482
|
};
|
|
483
483
|
"sonar/no-default-utility-imports": {
|
|
484
484
|
game_std: "error";
|
|
@@ -2329,7 +2329,7 @@ interface MainRuleDefaults {
|
|
|
2329
2329
|
"*": "off";
|
|
2330
2330
|
};
|
|
2331
2331
|
"sonar/no-dead-store": {
|
|
2332
|
-
"*": "
|
|
2332
|
+
"*": "off";
|
|
2333
2333
|
};
|
|
2334
2334
|
"sonar/no-default-utility-imports": {
|
|
2335
2335
|
game_std: "error";
|
|
@@ -5868,7 +5868,7 @@ interface TomlRuleDefaults {
|
|
|
5868
5868
|
"*": "off";
|
|
5869
5869
|
};
|
|
5870
5870
|
"sonar/no-dead-store": {
|
|
5871
|
-
"*": "
|
|
5871
|
+
"*": "off";
|
|
5872
5872
|
};
|
|
5873
5873
|
"sonar/no-default-utility-imports": {
|
|
5874
5874
|
game_std: "error";
|
|
@@ -6183,7 +6183,7 @@ interface YamlRuleDefaults {
|
|
|
6183
6183
|
"*": "off";
|
|
6184
6184
|
};
|
|
6185
6185
|
"sonar/no-dead-store": {
|
|
6186
|
-
"*": "
|
|
6186
|
+
"*": "off";
|
|
6187
6187
|
};
|
|
6188
6188
|
"sonar/no-default-utility-imports": {
|
|
6189
6189
|
game_std: "error";
|
|
@@ -7092,102 +7092,102 @@ interface RuleOptions {
|
|
|
7092
7092
|
'eslint-plugin/unique-test-case-names'?: Linter.RuleEntry<[]>;
|
|
7093
7093
|
/**
|
|
7094
7094
|
* Enforce arrow function return style based on line length
|
|
7095
|
-
* @see https://github.com/christopher-buss/eslint-plugin-flawless/blob/v1.4.
|
|
7095
|
+
* @see https://github.com/christopher-buss/eslint-plugin-flawless/blob/v1.4.3/src/rules/arrow-return-style/documentation.md
|
|
7096
7096
|
*/
|
|
7097
7097
|
'flawless/arrow-return-style'?: Linter.RuleEntry<FlawlessArrowReturnStyle>;
|
|
7098
7098
|
/**
|
|
7099
7099
|
* Disallow shorthand boolean JSX attributes
|
|
7100
|
-
* @see https://github.com/christopher-buss/eslint-plugin-flawless/blob/v1.4.
|
|
7100
|
+
* @see https://github.com/christopher-buss/eslint-plugin-flawless/blob/v1.4.3/src/rules/jsx-shorthand-boolean/documentation.md
|
|
7101
7101
|
*/
|
|
7102
7102
|
'flawless/jsx-shorthand-boolean'?: Linter.RuleEntry<[]>;
|
|
7103
7103
|
/**
|
|
7104
7104
|
* Enforce a consistent fragment form: the shorthand `<>...</>` or a named fragment
|
|
7105
|
-
* @see https://github.com/christopher-buss/eslint-plugin-flawless/blob/v1.4.
|
|
7105
|
+
* @see https://github.com/christopher-buss/eslint-plugin-flawless/blob/v1.4.3/src/rules/jsx-shorthand-fragment/documentation.md
|
|
7106
7106
|
*/
|
|
7107
7107
|
'flawless/jsx-shorthand-fragment'?: Linter.RuleEntry<FlawlessJsxShorthandFragment>;
|
|
7108
7108
|
/**
|
|
7109
7109
|
* Enforce a maximum number of lines of code in a function
|
|
7110
|
-
* @see https://github.com/christopher-buss/eslint-plugin-flawless/blob/v1.4.
|
|
7110
|
+
* @see https://github.com/christopher-buss/eslint-plugin-flawless/blob/v1.4.3/src/rules/max-lines-per-function/documentation.md
|
|
7111
7111
|
*/
|
|
7112
7112
|
'flawless/max-lines-per-function'?: Linter.RuleEntry<FlawlessMaxLinesPerFunction>;
|
|
7113
7113
|
/**
|
|
7114
7114
|
* Enforce naming conventions for everything across a codebase
|
|
7115
|
-
* @see https://github.com/christopher-buss/eslint-plugin-flawless/blob/v1.4.
|
|
7115
|
+
* @see https://github.com/christopher-buss/eslint-plugin-flawless/blob/v1.4.3/src/rules/naming-convention/documentation.md
|
|
7116
7116
|
*/
|
|
7117
7117
|
'flawless/naming-convention'?: Linter.RuleEntry<FlawlessNamingConvention>;
|
|
7118
7118
|
/**
|
|
7119
7119
|
* Disallow conditional logic in tests
|
|
7120
|
-
* @see https://github.com/christopher-buss/eslint-plugin-flawless/blob/v1.4.
|
|
7120
|
+
* @see https://github.com/christopher-buss/eslint-plugin-flawless/blob/v1.4.3/src/rules/no-conditional-in-test/documentation.md
|
|
7121
7121
|
*/
|
|
7122
7122
|
'flawless/no-conditional-in-test'?: Linter.RuleEntry<FlawlessNoConditionalInTest>;
|
|
7123
7123
|
/**
|
|
7124
7124
|
* Disallow anonymous arrow functions as export default declarations
|
|
7125
|
-
* @see https://github.com/christopher-buss/eslint-plugin-flawless/blob/v1.4.
|
|
7125
|
+
* @see https://github.com/christopher-buss/eslint-plugin-flawless/blob/v1.4.3/src/rules/no-export-default-arrow/documentation.md
|
|
7126
7126
|
*/
|
|
7127
7127
|
'flawless/no-export-default-arrow'?: Linter.RuleEntry<[]>;
|
|
7128
7128
|
/**
|
|
7129
7129
|
* Disallow tsconfig options that redundantly re-set a value already provided by an extended config
|
|
7130
|
-
* @see https://github.com/christopher-buss/eslint-plugin-flawless/blob/v1.4.
|
|
7130
|
+
* @see https://github.com/christopher-buss/eslint-plugin-flawless/blob/v1.4.3/src/rules/no-redundant-tsconfig-options/documentation.md
|
|
7131
7131
|
*/
|
|
7132
7132
|
'flawless/no-redundant-tsconfig-options'?: Linter.RuleEntry<[]>;
|
|
7133
7133
|
/**
|
|
7134
7134
|
* Disallow unnecessary usage of 'useCallback'
|
|
7135
|
-
* @see https://github.com/christopher-buss/eslint-plugin-flawless/blob/v1.4.
|
|
7135
|
+
* @see https://github.com/christopher-buss/eslint-plugin-flawless/blob/v1.4.3/src/rules/no-unnecessary-use-callback/documentation.md
|
|
7136
7136
|
*/
|
|
7137
7137
|
'flawless/no-unnecessary-use-callback'?: Linter.RuleEntry<[]>;
|
|
7138
7138
|
/**
|
|
7139
7139
|
* Disallow unnecessary usage of 'useMemo'
|
|
7140
|
-
* @see https://github.com/christopher-buss/eslint-plugin-flawless/blob/v1.4.
|
|
7140
|
+
* @see https://github.com/christopher-buss/eslint-plugin-flawless/blob/v1.4.3/src/rules/no-unnecessary-use-memo/documentation.md
|
|
7141
7141
|
*/
|
|
7142
7142
|
'flawless/no-unnecessary-use-memo'?: Linter.RuleEntry<[]>;
|
|
7143
7143
|
/**
|
|
7144
7144
|
* Enforce a blank line after `expect.assertions` and `expect.hasAssertions`
|
|
7145
|
-
* @see https://github.com/christopher-buss/eslint-plugin-flawless/blob/v1.4.
|
|
7145
|
+
* @see https://github.com/christopher-buss/eslint-plugin-flawless/blob/v1.4.3/src/rules/padding-after-expect-assertions/documentation.md
|
|
7146
7146
|
*/
|
|
7147
7147
|
'flawless/padding-after-expect-assertions'?: Linter.RuleEntry<[]>;
|
|
7148
7148
|
/**
|
|
7149
7149
|
* Enforce destructuring assignment for component props
|
|
7150
|
-
* @see https://github.com/christopher-buss/eslint-plugin-flawless/blob/v1.4.
|
|
7150
|
+
* @see https://github.com/christopher-buss/eslint-plugin-flawless/blob/v1.4.3/src/rules/prefer-destructuring-assignment/documentation.md
|
|
7151
7151
|
*/
|
|
7152
7152
|
'flawless/prefer-destructuring-assignment'?: Linter.RuleEntry<[]>;
|
|
7153
7153
|
/**
|
|
7154
7154
|
* Prefer having the last statement in a test be an assertion
|
|
7155
|
-
* @see https://github.com/christopher-buss/eslint-plugin-flawless/blob/v1.4.
|
|
7155
|
+
* @see https://github.com/christopher-buss/eslint-plugin-flawless/blob/v1.4.3/src/rules/prefer-ending-with-an-expect/documentation.md
|
|
7156
7156
|
*/
|
|
7157
7157
|
'flawless/prefer-ending-with-an-expect'?: Linter.RuleEntry<FlawlessPreferEndingWithAnExpect>;
|
|
7158
7158
|
/**
|
|
7159
7159
|
* Prefer `expect.assertions(<count>)` over `expect.hasAssertions()`
|
|
7160
|
-
* @see https://github.com/christopher-buss/eslint-plugin-flawless/blob/v1.4.
|
|
7160
|
+
* @see https://github.com/christopher-buss/eslint-plugin-flawless/blob/v1.4.3/src/rules/prefer-expect-assertions-count/documentation.md
|
|
7161
7161
|
*/
|
|
7162
7162
|
'flawless/prefer-expect-assertions-count'?: Linter.RuleEntry<[]>;
|
|
7163
7163
|
/**
|
|
7164
7164
|
* Enforce destructuring parameters in the function signature
|
|
7165
|
-
* @see https://github.com/christopher-buss/eslint-plugin-flawless/blob/v1.4.
|
|
7165
|
+
* @see https://github.com/christopher-buss/eslint-plugin-flawless/blob/v1.4.3/src/rules/prefer-parameter-destructuring/documentation.md
|
|
7166
7166
|
*/
|
|
7167
7167
|
'flawless/prefer-parameter-destructuring'?: Linter.RuleEntry<FlawlessPreferParameterDestructuring>;
|
|
7168
7168
|
/**
|
|
7169
7169
|
* Enforce that function component props are read-only
|
|
7170
|
-
* @see https://github.com/christopher-buss/eslint-plugin-flawless/blob/v1.4.
|
|
7170
|
+
* @see https://github.com/christopher-buss/eslint-plugin-flawless/blob/v1.4.3/src/rules/prefer-read-only-props/documentation.md
|
|
7171
7171
|
*/
|
|
7172
7172
|
'flawless/prefer-read-only-props'?: Linter.RuleEntry<FlawlessPreferReadOnlyProps>;
|
|
7173
7173
|
/**
|
|
7174
7174
|
* Disallow impure calls such as `math.random` or `os.clock` during render
|
|
7175
|
-
* @see https://github.com/christopher-buss/eslint-plugin-flawless/blob/v1.4.
|
|
7175
|
+
* @see https://github.com/christopher-buss/eslint-plugin-flawless/blob/v1.4.3/src/rules/purity/documentation.md
|
|
7176
7176
|
*/
|
|
7177
7177
|
'flawless/purity'?: Linter.RuleEntry<FlawlessPurity>;
|
|
7178
7178
|
/**
|
|
7179
7179
|
* Prefer named imports for React runtime values and the React namespace for React types
|
|
7180
|
-
* @see https://github.com/christopher-buss/eslint-plugin-flawless/blob/v1.4.
|
|
7180
|
+
* @see https://github.com/christopher-buss/eslint-plugin-flawless/blob/v1.4.3/src/rules/react-namespace/documentation.md
|
|
7181
7181
|
*/
|
|
7182
7182
|
'flawless/react-namespace'?: Linter.RuleEntry<[]>;
|
|
7183
7183
|
/**
|
|
7184
7184
|
* Enforce a configured sort order for TOML keys and tables
|
|
7185
|
-
* @see https://github.com/christopher-buss/eslint-plugin-flawless/blob/v1.4.
|
|
7185
|
+
* @see https://github.com/christopher-buss/eslint-plugin-flawless/blob/v1.4.3/src/rules/toml-sort-keys/documentation.md
|
|
7186
7186
|
*/
|
|
7187
7187
|
'flawless/toml-sort-keys'?: Linter.RuleEntry<FlawlessTomlSortKeys>;
|
|
7188
7188
|
/**
|
|
7189
7189
|
* Enforce blank lines around top-level YAML block collection keys
|
|
7190
|
-
* @see https://github.com/christopher-buss/eslint-plugin-flawless/blob/v1.4.
|
|
7190
|
+
* @see https://github.com/christopher-buss/eslint-plugin-flawless/blob/v1.4.3/src/rules/yaml-block-key-blank-lines/documentation.md
|
|
7191
7191
|
*/
|
|
7192
7192
|
'flawless/yaml-block-key-blank-lines'?: Linter.RuleEntry<[]>;
|
|
7193
7193
|
/**
|
package/dist/index.mjs
CHANGED
|
@@ -3995,7 +3995,7 @@ function sonarjsRules({ isInEditor, roblox = true }) {
|
|
|
3995
3995
|
"sonar/no-all-duplicated-branches": "error",
|
|
3996
3996
|
"sonar/no-collapsible-if": "error",
|
|
3997
3997
|
"sonar/no-commented-code": "off",
|
|
3998
|
-
"sonar/no-dead-store": "
|
|
3998
|
+
"sonar/no-dead-store": "off",
|
|
3999
3999
|
"sonar/no-duplicate-string": ["error", { ignoreStrings: "Not implemented" }],
|
|
4000
4000
|
"sonar/no-duplicated-branches": "error",
|
|
4001
4001
|
"sonar/no-element-overwrite": "error",
|
|
@@ -15662,6 +15662,7 @@ const oxlintRuleMapping = {
|
|
|
15662
15662
|
"vitest/no-hooks": "native",
|
|
15663
15663
|
"vitest/no-identical-title": "native",
|
|
15664
15664
|
"vitest/no-import-node-test": "native",
|
|
15665
|
+
"vitest/no-importing-vitest-globals": "native",
|
|
15665
15666
|
"vitest/no-interpolation-in-snapshots": "native",
|
|
15666
15667
|
"vitest/no-large-snapshots": "native",
|
|
15667
15668
|
"vitest/no-mocks-import": "native",
|
package/dist/lint-cli.mjs
CHANGED
|
@@ -36,7 +36,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
36
36
|
}) : target, mod));
|
|
37
37
|
//#endregion
|
|
38
38
|
//#region package.json
|
|
39
|
-
var version = "6.0.0-beta.
|
|
39
|
+
var version = "6.0.0-beta.29";
|
|
40
40
|
//#endregion
|
|
41
41
|
//#region src/lint-cli/lib/cli/types.ts
|
|
42
42
|
/**
|
package/dist/oxlint.d.mts
CHANGED
|
@@ -1567,7 +1567,7 @@ interface OxlintMainRuleDefaults {
|
|
|
1567
1567
|
"*": "error";
|
|
1568
1568
|
};
|
|
1569
1569
|
"sonar/no-dead-store": {
|
|
1570
|
-
"*": "
|
|
1570
|
+
"*": "off";
|
|
1571
1571
|
};
|
|
1572
1572
|
"sonar/no-default-utility-imports": {
|
|
1573
1573
|
game_std: "error";
|
|
@@ -4280,102 +4280,102 @@ interface RuleOptions {
|
|
|
4280
4280
|
'eslint-plugin/unique-test-case-names'?: Linter.RuleEntry<[]>;
|
|
4281
4281
|
/**
|
|
4282
4282
|
* Enforce arrow function return style based on line length
|
|
4283
|
-
* @see https://github.com/christopher-buss/eslint-plugin-flawless/blob/v1.4.
|
|
4283
|
+
* @see https://github.com/christopher-buss/eslint-plugin-flawless/blob/v1.4.3/src/rules/arrow-return-style/documentation.md
|
|
4284
4284
|
*/
|
|
4285
4285
|
'flawless/arrow-return-style'?: Linter.RuleEntry<FlawlessArrowReturnStyle>;
|
|
4286
4286
|
/**
|
|
4287
4287
|
* Disallow shorthand boolean JSX attributes
|
|
4288
|
-
* @see https://github.com/christopher-buss/eslint-plugin-flawless/blob/v1.4.
|
|
4288
|
+
* @see https://github.com/christopher-buss/eslint-plugin-flawless/blob/v1.4.3/src/rules/jsx-shorthand-boolean/documentation.md
|
|
4289
4289
|
*/
|
|
4290
4290
|
'flawless/jsx-shorthand-boolean'?: Linter.RuleEntry<[]>;
|
|
4291
4291
|
/**
|
|
4292
4292
|
* Enforce a consistent fragment form: the shorthand `<>...</>` or a named fragment
|
|
4293
|
-
* @see https://github.com/christopher-buss/eslint-plugin-flawless/blob/v1.4.
|
|
4293
|
+
* @see https://github.com/christopher-buss/eslint-plugin-flawless/blob/v1.4.3/src/rules/jsx-shorthand-fragment/documentation.md
|
|
4294
4294
|
*/
|
|
4295
4295
|
'flawless/jsx-shorthand-fragment'?: Linter.RuleEntry<FlawlessJsxShorthandFragment>;
|
|
4296
4296
|
/**
|
|
4297
4297
|
* Enforce a maximum number of lines of code in a function
|
|
4298
|
-
* @see https://github.com/christopher-buss/eslint-plugin-flawless/blob/v1.4.
|
|
4298
|
+
* @see https://github.com/christopher-buss/eslint-plugin-flawless/blob/v1.4.3/src/rules/max-lines-per-function/documentation.md
|
|
4299
4299
|
*/
|
|
4300
4300
|
'flawless/max-lines-per-function'?: Linter.RuleEntry<FlawlessMaxLinesPerFunction>;
|
|
4301
4301
|
/**
|
|
4302
4302
|
* Enforce naming conventions for everything across a codebase
|
|
4303
|
-
* @see https://github.com/christopher-buss/eslint-plugin-flawless/blob/v1.4.
|
|
4303
|
+
* @see https://github.com/christopher-buss/eslint-plugin-flawless/blob/v1.4.3/src/rules/naming-convention/documentation.md
|
|
4304
4304
|
*/
|
|
4305
4305
|
'flawless/naming-convention'?: Linter.RuleEntry<FlawlessNamingConvention>;
|
|
4306
4306
|
/**
|
|
4307
4307
|
* Disallow conditional logic in tests
|
|
4308
|
-
* @see https://github.com/christopher-buss/eslint-plugin-flawless/blob/v1.4.
|
|
4308
|
+
* @see https://github.com/christopher-buss/eslint-plugin-flawless/blob/v1.4.3/src/rules/no-conditional-in-test/documentation.md
|
|
4309
4309
|
*/
|
|
4310
4310
|
'flawless/no-conditional-in-test'?: Linter.RuleEntry<FlawlessNoConditionalInTest>;
|
|
4311
4311
|
/**
|
|
4312
4312
|
* Disallow anonymous arrow functions as export default declarations
|
|
4313
|
-
* @see https://github.com/christopher-buss/eslint-plugin-flawless/blob/v1.4.
|
|
4313
|
+
* @see https://github.com/christopher-buss/eslint-plugin-flawless/blob/v1.4.3/src/rules/no-export-default-arrow/documentation.md
|
|
4314
4314
|
*/
|
|
4315
4315
|
'flawless/no-export-default-arrow'?: Linter.RuleEntry<[]>;
|
|
4316
4316
|
/**
|
|
4317
4317
|
* Disallow tsconfig options that redundantly re-set a value already provided by an extended config
|
|
4318
|
-
* @see https://github.com/christopher-buss/eslint-plugin-flawless/blob/v1.4.
|
|
4318
|
+
* @see https://github.com/christopher-buss/eslint-plugin-flawless/blob/v1.4.3/src/rules/no-redundant-tsconfig-options/documentation.md
|
|
4319
4319
|
*/
|
|
4320
4320
|
'flawless/no-redundant-tsconfig-options'?: Linter.RuleEntry<[]>;
|
|
4321
4321
|
/**
|
|
4322
4322
|
* Disallow unnecessary usage of 'useCallback'
|
|
4323
|
-
* @see https://github.com/christopher-buss/eslint-plugin-flawless/blob/v1.4.
|
|
4323
|
+
* @see https://github.com/christopher-buss/eslint-plugin-flawless/blob/v1.4.3/src/rules/no-unnecessary-use-callback/documentation.md
|
|
4324
4324
|
*/
|
|
4325
4325
|
'flawless/no-unnecessary-use-callback'?: Linter.RuleEntry<[]>;
|
|
4326
4326
|
/**
|
|
4327
4327
|
* Disallow unnecessary usage of 'useMemo'
|
|
4328
|
-
* @see https://github.com/christopher-buss/eslint-plugin-flawless/blob/v1.4.
|
|
4328
|
+
* @see https://github.com/christopher-buss/eslint-plugin-flawless/blob/v1.4.3/src/rules/no-unnecessary-use-memo/documentation.md
|
|
4329
4329
|
*/
|
|
4330
4330
|
'flawless/no-unnecessary-use-memo'?: Linter.RuleEntry<[]>;
|
|
4331
4331
|
/**
|
|
4332
4332
|
* Enforce a blank line after `expect.assertions` and `expect.hasAssertions`
|
|
4333
|
-
* @see https://github.com/christopher-buss/eslint-plugin-flawless/blob/v1.4.
|
|
4333
|
+
* @see https://github.com/christopher-buss/eslint-plugin-flawless/blob/v1.4.3/src/rules/padding-after-expect-assertions/documentation.md
|
|
4334
4334
|
*/
|
|
4335
4335
|
'flawless/padding-after-expect-assertions'?: Linter.RuleEntry<[]>;
|
|
4336
4336
|
/**
|
|
4337
4337
|
* Enforce destructuring assignment for component props
|
|
4338
|
-
* @see https://github.com/christopher-buss/eslint-plugin-flawless/blob/v1.4.
|
|
4338
|
+
* @see https://github.com/christopher-buss/eslint-plugin-flawless/blob/v1.4.3/src/rules/prefer-destructuring-assignment/documentation.md
|
|
4339
4339
|
*/
|
|
4340
4340
|
'flawless/prefer-destructuring-assignment'?: Linter.RuleEntry<[]>;
|
|
4341
4341
|
/**
|
|
4342
4342
|
* Prefer having the last statement in a test be an assertion
|
|
4343
|
-
* @see https://github.com/christopher-buss/eslint-plugin-flawless/blob/v1.4.
|
|
4343
|
+
* @see https://github.com/christopher-buss/eslint-plugin-flawless/blob/v1.4.3/src/rules/prefer-ending-with-an-expect/documentation.md
|
|
4344
4344
|
*/
|
|
4345
4345
|
'flawless/prefer-ending-with-an-expect'?: Linter.RuleEntry<FlawlessPreferEndingWithAnExpect>;
|
|
4346
4346
|
/**
|
|
4347
4347
|
* Prefer `expect.assertions(<count>)` over `expect.hasAssertions()`
|
|
4348
|
-
* @see https://github.com/christopher-buss/eslint-plugin-flawless/blob/v1.4.
|
|
4348
|
+
* @see https://github.com/christopher-buss/eslint-plugin-flawless/blob/v1.4.3/src/rules/prefer-expect-assertions-count/documentation.md
|
|
4349
4349
|
*/
|
|
4350
4350
|
'flawless/prefer-expect-assertions-count'?: Linter.RuleEntry<[]>;
|
|
4351
4351
|
/**
|
|
4352
4352
|
* Enforce destructuring parameters in the function signature
|
|
4353
|
-
* @see https://github.com/christopher-buss/eslint-plugin-flawless/blob/v1.4.
|
|
4353
|
+
* @see https://github.com/christopher-buss/eslint-plugin-flawless/blob/v1.4.3/src/rules/prefer-parameter-destructuring/documentation.md
|
|
4354
4354
|
*/
|
|
4355
4355
|
'flawless/prefer-parameter-destructuring'?: Linter.RuleEntry<FlawlessPreferParameterDestructuring>;
|
|
4356
4356
|
/**
|
|
4357
4357
|
* Enforce that function component props are read-only
|
|
4358
|
-
* @see https://github.com/christopher-buss/eslint-plugin-flawless/blob/v1.4.
|
|
4358
|
+
* @see https://github.com/christopher-buss/eslint-plugin-flawless/blob/v1.4.3/src/rules/prefer-read-only-props/documentation.md
|
|
4359
4359
|
*/
|
|
4360
4360
|
'flawless/prefer-read-only-props'?: Linter.RuleEntry<FlawlessPreferReadOnlyProps>;
|
|
4361
4361
|
/**
|
|
4362
4362
|
* Disallow impure calls such as `math.random` or `os.clock` during render
|
|
4363
|
-
* @see https://github.com/christopher-buss/eslint-plugin-flawless/blob/v1.4.
|
|
4363
|
+
* @see https://github.com/christopher-buss/eslint-plugin-flawless/blob/v1.4.3/src/rules/purity/documentation.md
|
|
4364
4364
|
*/
|
|
4365
4365
|
'flawless/purity'?: Linter.RuleEntry<FlawlessPurity>;
|
|
4366
4366
|
/**
|
|
4367
4367
|
* Prefer named imports for React runtime values and the React namespace for React types
|
|
4368
|
-
* @see https://github.com/christopher-buss/eslint-plugin-flawless/blob/v1.4.
|
|
4368
|
+
* @see https://github.com/christopher-buss/eslint-plugin-flawless/blob/v1.4.3/src/rules/react-namespace/documentation.md
|
|
4369
4369
|
*/
|
|
4370
4370
|
'flawless/react-namespace'?: Linter.RuleEntry<[]>;
|
|
4371
4371
|
/**
|
|
4372
4372
|
* Enforce a configured sort order for TOML keys and tables
|
|
4373
|
-
* @see https://github.com/christopher-buss/eslint-plugin-flawless/blob/v1.4.
|
|
4373
|
+
* @see https://github.com/christopher-buss/eslint-plugin-flawless/blob/v1.4.3/src/rules/toml-sort-keys/documentation.md
|
|
4374
4374
|
*/
|
|
4375
4375
|
'flawless/toml-sort-keys'?: Linter.RuleEntry<FlawlessTomlSortKeys>;
|
|
4376
4376
|
/**
|
|
4377
4377
|
* Enforce blank lines around top-level YAML block collection keys
|
|
4378
|
-
* @see https://github.com/christopher-buss/eslint-plugin-flawless/blob/v1.4.
|
|
4378
|
+
* @see https://github.com/christopher-buss/eslint-plugin-flawless/blob/v1.4.3/src/rules/yaml-block-key-blank-lines/documentation.md
|
|
4379
4379
|
*/
|
|
4380
4380
|
'flawless/yaml-block-key-blank-lines'?: Linter.RuleEntry<[]>;
|
|
4381
4381
|
/**
|
|
@@ -32538,6 +32538,17 @@ type OxlintFactoryOptions = {
|
|
|
32538
32538
|
* see no effect from this option.
|
|
32539
32539
|
*/
|
|
32540
32540
|
oxc?: boolean;
|
|
32541
|
+
/**
|
|
32542
|
+
* Warn about `overrides` entries oxlint cannot apply. Defaults to `true`.
|
|
32543
|
+
*
|
|
32544
|
+
* An override is authoritative: it applies at the scope its config option
|
|
32545
|
+
* covers whether or not the preset enables the rule. A few cannot be
|
|
32546
|
+
* honoured — a rule that needs type information oxlint has no jsPlugin
|
|
32547
|
+
* route for, a plugin that is not installed, or one dropped by
|
|
32548
|
+
* `jsPlugins: false` — and those are reported rather than discarded in
|
|
32549
|
+
* silence.
|
|
32550
|
+
*/
|
|
32551
|
+
warnDroppedOverrides?: boolean;
|
|
32541
32552
|
} & Omit<TypedOxlintConfigItem, "files" | "jsPlugins"> & OxlintOptionsConfig;
|
|
32542
32553
|
//#endregion
|
|
32543
32554
|
//#region src/oxlint/factory.d.ts
|
package/dist/oxlint.mjs
CHANGED
|
@@ -1523,6 +1523,7 @@ const oxlintRuleMapping = {
|
|
|
1523
1523
|
"vitest/no-hooks": "native",
|
|
1524
1524
|
"vitest/no-identical-title": "native",
|
|
1525
1525
|
"vitest/no-import-node-test": "native",
|
|
1526
|
+
"vitest/no-importing-vitest-globals": "native",
|
|
1526
1527
|
"vitest/no-interpolation-in-snapshots": "native",
|
|
1527
1528
|
"vitest/no-large-snapshots": "native",
|
|
1528
1529
|
"vitest/no-mocks-import": "native",
|
|
@@ -1772,6 +1773,18 @@ function isOxlintCovered(rule) {
|
|
|
1772
1773
|
return rule in oxlintRuleMapping || rule in oxcCoveredRules;
|
|
1773
1774
|
}
|
|
1774
1775
|
/**
|
|
1776
|
+
* Whether the rule's oxlint side is a differently-named native oxc rule, which
|
|
1777
|
+
* {@link translateRuleToOxlint} resolves. Such rules are in
|
|
1778
|
+
* {@link excludedFromOxlint} so the preset never emits both halves, but a user
|
|
1779
|
+
* override naming one still has somewhere to go.
|
|
1780
|
+
*
|
|
1781
|
+
* @param rule - The canonical ESLint rule name.
|
|
1782
|
+
* @returns Whether an oxc rule covers the rule under another name.
|
|
1783
|
+
*/
|
|
1784
|
+
function isOxcCoveredRule(rule) {
|
|
1785
|
+
return rule in oxcCoveredRules;
|
|
1786
|
+
}
|
|
1787
|
+
/**
|
|
1775
1788
|
* Whether the rule runs via oxlint-tsgolint (`oxlint --type-aware`); such rules
|
|
1776
1789
|
* are noise without type information, so they are gated on `typeAware`.
|
|
1777
1790
|
*
|
|
@@ -2660,6 +2673,76 @@ function commentLengthRules({ maxLength, multiLineMaxLength, semanticComments, t
|
|
|
2660
2673
|
};
|
|
2661
2674
|
}
|
|
2662
2675
|
//#endregion
|
|
2676
|
+
//#region src/oxlint/override-diagnostics.ts
|
|
2677
|
+
const REASON_TEXT = {
|
|
2678
|
+
"eslint-only": "oxlint cannot run this rule; it stays in ESLint",
|
|
2679
|
+
"missing-plugin": "the plugin that owns it is not installed",
|
|
2680
|
+
"native-only": "it needs a jsPlugin, and `jsPlugins: false` is set"
|
|
2681
|
+
};
|
|
2682
|
+
/**
|
|
2683
|
+
* Override diagnostics for the config build in progress: the entries that never
|
|
2684
|
+
* reached the generated config, and the oxlint names of the ones that did.
|
|
2685
|
+
*
|
|
2686
|
+
* The splitter runs deep inside the config modules, which return config
|
|
2687
|
+
* fragments and have no channel for diagnostics — and an override can be
|
|
2688
|
+
* dropped without leaving a fragment behind at all. The factory drains both
|
|
2689
|
+
* buffers per build, which is safe because it builds synchronously from start
|
|
2690
|
+
* to finish.
|
|
2691
|
+
*/
|
|
2692
|
+
const droppedOverrides = [];
|
|
2693
|
+
const overrideRules = /* @__PURE__ */ new Set();
|
|
2694
|
+
/**
|
|
2695
|
+
* Record an override that never reached the generated config.
|
|
2696
|
+
*
|
|
2697
|
+
* @param entry - The dropped override and the reason it was dropped.
|
|
2698
|
+
*/
|
|
2699
|
+
function recordDroppedOverride(entry) {
|
|
2700
|
+
droppedOverrides.push(entry);
|
|
2701
|
+
}
|
|
2702
|
+
/**
|
|
2703
|
+
* Record the oxlint names of overrides that made it into a fragment, so a later
|
|
2704
|
+
* pass that deletes rules (native-only mode) can tell a user's entry from the
|
|
2705
|
+
* preset's.
|
|
2706
|
+
*
|
|
2707
|
+
* @param rules - The oxlint rule names.
|
|
2708
|
+
*/
|
|
2709
|
+
function recordOverrideRules(rules) {
|
|
2710
|
+
for (const rule of rules) overrideRules.add(rule);
|
|
2711
|
+
}
|
|
2712
|
+
/**
|
|
2713
|
+
* Take everything recorded since the last call, emptying both buffers.
|
|
2714
|
+
*
|
|
2715
|
+
* @returns The dropped overrides (deduplicated by rule and reason) and the
|
|
2716
|
+
* oxlint names of the overrides that were emitted.
|
|
2717
|
+
*/
|
|
2718
|
+
function takeOverrideDiagnostics() {
|
|
2719
|
+
const taken = droppedOverrides.splice(0);
|
|
2720
|
+
const emitted = new Set(overrideRules);
|
|
2721
|
+
overrideRules.clear();
|
|
2722
|
+
const seen = /* @__PURE__ */ new Set();
|
|
2723
|
+
return {
|
|
2724
|
+
dropped: taken.filter(({ reason, rule }) => {
|
|
2725
|
+
const key = `${rule} ${reason}`;
|
|
2726
|
+
if (seen.has(key)) return false;
|
|
2727
|
+
seen.add(key);
|
|
2728
|
+
return true;
|
|
2729
|
+
}),
|
|
2730
|
+
emitted
|
|
2731
|
+
};
|
|
2732
|
+
}
|
|
2733
|
+
/**
|
|
2734
|
+
* Warn about `overrides` entries that could not be applied. An override is a
|
|
2735
|
+
* deliberate instruction, so a silently discarded one leaves a rule reporting
|
|
2736
|
+
* (or not reporting) with no way to tell why.
|
|
2737
|
+
*
|
|
2738
|
+
* @param entries - What was dropped, and why; an empty list warns nothing.
|
|
2739
|
+
*/
|
|
2740
|
+
function warnDroppedOverrides(entries) {
|
|
2741
|
+
if (entries.length === 0) return;
|
|
2742
|
+
const lines = entries.map(({ reason, rule }) => ` - "${rule}": ${REASON_TEXT[reason]}`);
|
|
2743
|
+
console.warn(`[@isentinel/eslint-config] These \`overrides\` entries could not be applied to oxlint:\n${lines.join("\n")}`);
|
|
2744
|
+
}
|
|
2745
|
+
//#endregion
|
|
2663
2746
|
//#region src/oxlint/utils.ts
|
|
2664
2747
|
/**
|
|
2665
2748
|
* Every plugin oxlint implements natively, derived from the generated rule
|
|
@@ -2681,6 +2764,7 @@ function isNativePlugin(prefix) {
|
|
|
2681
2764
|
*/
|
|
2682
2765
|
const consumerAnchor = pathToFileURL(`${process.cwd()}/`).href;
|
|
2683
2766
|
const specifierCache = /* @__PURE__ */ new Map();
|
|
2767
|
+
const NO_OVERRIDES = /* @__PURE__ */ new Set();
|
|
2684
2768
|
/**
|
|
2685
2769
|
* Resolve a jsPlugin specifier, throwing when the package is not installed.
|
|
2686
2770
|
*
|
|
@@ -2785,16 +2869,22 @@ function scopeOverridePlugins(overrides, globalPlugins) {
|
|
|
2785
2869
|
*
|
|
2786
2870
|
* @param overrides - The merged overrides (mutated).
|
|
2787
2871
|
* @param registeredPlugins - Every native plugin and jsPlugin name registered.
|
|
2872
|
+
* @returns The oxlint names of the rules that were deleted.
|
|
2788
2873
|
*/
|
|
2789
2874
|
function stripUnregisteredPluginRules(overrides, registeredPlugins) {
|
|
2875
|
+
const stripped = /* @__PURE__ */ new Set();
|
|
2790
2876
|
for (const override of overrides) {
|
|
2791
2877
|
const { rules } = override;
|
|
2792
2878
|
if (rules === void 0) continue;
|
|
2793
2879
|
for (const rule of Object.keys(rules)) {
|
|
2794
2880
|
const slashIndex = rule.indexOf("/");
|
|
2795
|
-
if (slashIndex !== -1 && !registeredPlugins.has(rule.slice(0, slashIndex)))
|
|
2881
|
+
if (slashIndex !== -1 && !registeredPlugins.has(rule.slice(0, slashIndex))) {
|
|
2882
|
+
delete rules[rule];
|
|
2883
|
+
stripped.add(rule);
|
|
2884
|
+
}
|
|
2796
2885
|
}
|
|
2797
2886
|
}
|
|
2887
|
+
return stripped;
|
|
2798
2888
|
}
|
|
2799
2889
|
/**
|
|
2800
2890
|
* Split a canonical (ESLint-named) rule map into oxlint-native rules and
|
|
@@ -2804,22 +2894,32 @@ function stripUnregisteredPluginRules(overrides, registeredPlugins) {
|
|
|
2804
2894
|
* rules, which only run in standalone mode) are treated as jsPlugin rules.
|
|
2805
2895
|
* Disabled unmapped rules are skipped so that no jsPlugin is loaded solely for
|
|
2806
2896
|
* an "off" entry, unless `keepUnmappedOff` is set (user options.rules must not
|
|
2807
|
-
* silently discard an explicit disable)
|
|
2897
|
+
* silently discard an explicit disable) or the entry is a user override, which
|
|
2898
|
+
* is authoritative.
|
|
2808
2899
|
*
|
|
2809
2900
|
* @param rules - The canonical rule map.
|
|
2810
|
-
* @param
|
|
2811
|
-
*
|
|
2901
|
+
* @param options - Which entries survive the filters, and which came from the
|
|
2902
|
+
* user.
|
|
2812
2903
|
* @returns The split rules with the plugins each side requires.
|
|
2813
2904
|
*/
|
|
2814
|
-
function splitOxlintRules(rules, keepUnmappedOff = false) {
|
|
2905
|
+
function splitOxlintRules(rules, { keepUnmappedOff = false, overrides = NO_OVERRIDES } = {}) {
|
|
2815
2906
|
const nativeRules = {};
|
|
2816
2907
|
const jsPluginRules = {};
|
|
2817
2908
|
const nativePlugins = /* @__PURE__ */ new Set();
|
|
2818
2909
|
const jsPluginPrefixes = /* @__PURE__ */ new Set();
|
|
2819
2910
|
const tsCollapsed = /* @__PURE__ */ new Set();
|
|
2911
|
+
const overrideRules = /* @__PURE__ */ new Set();
|
|
2820
2912
|
const entries = Object.entries(rules ?? {});
|
|
2821
2913
|
for (const [rule, value] of entries) {
|
|
2822
|
-
if (value === void 0
|
|
2914
|
+
if (value === void 0) continue;
|
|
2915
|
+
const isOverride = overrides.has(rule);
|
|
2916
|
+
if (excludedFromOxlint.has(rule) && (!isOverride || !isOxcCoveredRule(rule))) {
|
|
2917
|
+
if (isOverride) recordDroppedOverride({
|
|
2918
|
+
reason: "eslint-only",
|
|
2919
|
+
rule
|
|
2920
|
+
});
|
|
2921
|
+
continue;
|
|
2922
|
+
}
|
|
2823
2923
|
const covered = isOxlintCovered(rule);
|
|
2824
2924
|
const severity = Array.isArray(value) ? value[0] : value;
|
|
2825
2925
|
const isOff = severity === "off" || severity === 0;
|
|
@@ -2827,7 +2927,8 @@ function splitOxlintRules(rules, keepUnmappedOff = false) {
|
|
|
2827
2927
|
const slashIndex = translated.indexOf("/");
|
|
2828
2928
|
const prefix = slashIndex === -1 ? "eslint" : translated.slice(0, slashIndex);
|
|
2829
2929
|
const nativePrefix = isNativePlugin(prefix) ? prefix : void 0;
|
|
2830
|
-
if (
|
|
2930
|
+
if (isOverride) overrideRules.add(translated);
|
|
2931
|
+
if (!covered && isOff && (keepUnmappedOff || isOverride)) {
|
|
2831
2932
|
if (nativePrefix !== void 0) {
|
|
2832
2933
|
nativeRules[translated] = value;
|
|
2833
2934
|
nativePlugins.add(nativePrefix);
|
|
@@ -2836,7 +2937,10 @@ function splitOxlintRules(rules, keepUnmappedOff = false) {
|
|
|
2836
2937
|
if (specifier !== void 0 && canResolveJsPlugin(specifier)) {
|
|
2837
2938
|
jsPluginRules[translated] = value;
|
|
2838
2939
|
jsPluginPrefixes.add(prefix);
|
|
2839
|
-
}
|
|
2940
|
+
} else if (isOverride) recordDroppedOverride({
|
|
2941
|
+
reason: "missing-plugin",
|
|
2942
|
+
rule
|
|
2943
|
+
});
|
|
2840
2944
|
}
|
|
2841
2945
|
continue;
|
|
2842
2946
|
}
|
|
@@ -2846,10 +2950,11 @@ function splitOxlintRules(rules, keepUnmappedOff = false) {
|
|
|
2846
2950
|
jsPluginPrefixes.add(prefix);
|
|
2847
2951
|
continue;
|
|
2848
2952
|
}
|
|
2953
|
+
if (!isOverride && overrideRules.has(translated) && (collapsesToTsCoreRule(rule) || isTsCoreCounterpartRule(rule))) continue;
|
|
2849
2954
|
if (collapsesToTsCoreRule(rule)) {
|
|
2850
2955
|
tsCollapsed.add(translated);
|
|
2851
2956
|
nativeRules[translated] = value;
|
|
2852
|
-
} else if (!isTsCoreCounterpartRule(rule) || !tsCollapsed.has(translated)) nativeRules[translated] = value;
|
|
2957
|
+
} else if (isOverride || !isTsCoreCounterpartRule(rule) || !tsCollapsed.has(translated)) nativeRules[translated] = value;
|
|
2853
2958
|
if (nativePrefix !== void 0) nativePlugins.add(nativePrefix);
|
|
2854
2959
|
}
|
|
2855
2960
|
const jsPlugins = [];
|
|
@@ -2865,7 +2970,8 @@ function splitOxlintRules(rules, keepUnmappedOff = false) {
|
|
|
2865
2970
|
jsPluginRules,
|
|
2866
2971
|
jsPlugins,
|
|
2867
2972
|
nativePlugins: [...nativePlugins],
|
|
2868
|
-
nativeRules
|
|
2973
|
+
nativeRules,
|
|
2974
|
+
overrideRules: [...overrideRules]
|
|
2869
2975
|
};
|
|
2870
2976
|
}
|
|
2871
2977
|
/**
|
|
@@ -2875,8 +2981,15 @@ function splitOxlintRules(rules, keepUnmappedOff = false) {
|
|
|
2875
2981
|
* @param options - The fragment options.
|
|
2876
2982
|
* @returns The generated config fragments.
|
|
2877
2983
|
*/
|
|
2878
|
-
function createOxlintConfigs({ name, excludeFiles, files, globals, keepUnmappedOff = false, rules, settings }) {
|
|
2879
|
-
const { jsPluginRules, jsPlugins, nativePlugins, nativeRules } = splitOxlintRules(rules
|
|
2984
|
+
function createOxlintConfigs({ name, excludeFiles, files, globals, keepUnmappedOff = false, overrides, rules, settings }) {
|
|
2985
|
+
const { jsPluginRules, jsPlugins, nativePlugins, nativeRules, overrideRules } = splitOxlintRules(overrides === void 0 ? rules : {
|
|
2986
|
+
...rules,
|
|
2987
|
+
...overrides
|
|
2988
|
+
}, {
|
|
2989
|
+
keepUnmappedOff,
|
|
2990
|
+
overrides: new Set(Object.keys(overrides ?? {}))
|
|
2991
|
+
});
|
|
2992
|
+
recordOverrideRules(overrideRules);
|
|
2880
2993
|
const fragments = [];
|
|
2881
2994
|
if (Object.keys(nativeRules).length > 0) fragments.push({
|
|
2882
2995
|
name,
|
|
@@ -3295,14 +3408,12 @@ function oxlintE18e({ excludeFiles, files = [GLOB_SRC], modernization = true, no
|
|
|
3295
3408
|
name: "isentinel/e18e",
|
|
3296
3409
|
...excludeFiles ? { excludeFiles } : {},
|
|
3297
3410
|
files: files.flat(),
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
...overrides
|
|
3305
|
-
}
|
|
3411
|
+
overrides,
|
|
3412
|
+
rules: e18eRules({
|
|
3413
|
+
modernization,
|
|
3414
|
+
nodeMajor,
|
|
3415
|
+
performanceImprovements
|
|
3416
|
+
})
|
|
3306
3417
|
}), ...createOxlintConfigs({
|
|
3307
3418
|
name: "isentinel/e18e/disables/test",
|
|
3308
3419
|
files: [...GLOB_TESTS],
|
|
@@ -3365,10 +3476,8 @@ function oxlintEslintPlugin(options = {}) {
|
|
|
3365
3476
|
return createOxlintConfigs({
|
|
3366
3477
|
name: "isentinel/eslint-plugin",
|
|
3367
3478
|
files: options.files?.flat() ?? ["**/*.{,c,m}[jt]s{,x}"],
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
...overrides
|
|
3371
|
-
}
|
|
3479
|
+
overrides,
|
|
3480
|
+
rules: eslintPluginRules()
|
|
3372
3481
|
});
|
|
3373
3482
|
}
|
|
3374
3483
|
//#endregion
|
|
@@ -3817,14 +3926,12 @@ function oxlintJavascript(options = {}) {
|
|
|
3817
3926
|
navigator: "readonly",
|
|
3818
3927
|
window: "readonly"
|
|
3819
3928
|
},
|
|
3820
|
-
|
|
3821
|
-
|
|
3822
|
-
|
|
3823
|
-
|
|
3824
|
-
|
|
3825
|
-
|
|
3826
|
-
...overrides
|
|
3827
|
-
}
|
|
3929
|
+
overrides,
|
|
3930
|
+
rules: javascriptRules({
|
|
3931
|
+
isInEditor,
|
|
3932
|
+
roblox,
|
|
3933
|
+
stylistic
|
|
3934
|
+
})
|
|
3828
3935
|
});
|
|
3829
3936
|
}
|
|
3830
3937
|
function toGlobals(source, override) {
|
|
@@ -4608,14 +4715,12 @@ function oxlintReact(options = {}) {
|
|
|
4608
4715
|
return [...createOxlintConfigs({
|
|
4609
4716
|
name: "isentinel/react",
|
|
4610
4717
|
files,
|
|
4611
|
-
|
|
4612
|
-
|
|
4613
|
-
|
|
4614
|
-
|
|
4615
|
-
|
|
4616
|
-
|
|
4617
|
-
...overrides
|
|
4618
|
-
},
|
|
4718
|
+
overrides,
|
|
4719
|
+
rules: reactRules({
|
|
4720
|
+
filenameCase,
|
|
4721
|
+
reactCompiler,
|
|
4722
|
+
stylistic
|
|
4723
|
+
}),
|
|
4619
4724
|
settings: { "react-x": {
|
|
4620
4725
|
importSource: importSource ?? "@rbxts",
|
|
4621
4726
|
version: "17.0.2"
|
|
@@ -4681,10 +4786,8 @@ function oxlintRoblox(options = {}) {
|
|
|
4681
4786
|
"**/*/*.{,c,m}tsx",
|
|
4682
4787
|
...componentExtensions.map((extension) => `**/*/*.${extension}`)
|
|
4683
4788
|
],
|
|
4684
|
-
|
|
4685
|
-
|
|
4686
|
-
...overrides
|
|
4687
|
-
}
|
|
4789
|
+
overrides,
|
|
4790
|
+
rules: robloxRules({ stylistic })
|
|
4688
4791
|
});
|
|
4689
4792
|
}
|
|
4690
4793
|
//#endregion
|
|
@@ -4752,7 +4855,7 @@ function sonarjsRules({ isInEditor, roblox = true }) {
|
|
|
4752
4855
|
"sonar/no-all-duplicated-branches": "error",
|
|
4753
4856
|
"sonar/no-collapsible-if": "error",
|
|
4754
4857
|
"sonar/no-commented-code": "off",
|
|
4755
|
-
"sonar/no-dead-store": "
|
|
4858
|
+
"sonar/no-dead-store": "off",
|
|
4756
4859
|
"sonar/no-duplicate-string": ["error", { ignoreStrings: "Not implemented" }],
|
|
4757
4860
|
"sonar/no-duplicated-branches": "error",
|
|
4758
4861
|
"sonar/no-element-overwrite": "error",
|
|
@@ -5189,6 +5292,10 @@ function oxlintTest({ files = GLOB_TESTS, isInEditor = false, jest = false, over
|
|
|
5189
5292
|
if (enableJest) configs.push(...createOxlintConfigs({
|
|
5190
5293
|
name: "isentinel/test/jest",
|
|
5191
5294
|
files: jestOptions.files?.flat() ?? files.flat(),
|
|
5295
|
+
overrides: {
|
|
5296
|
+
...overrides,
|
|
5297
|
+
...jestOptions.overrides
|
|
5298
|
+
},
|
|
5192
5299
|
rules: {
|
|
5193
5300
|
...jestRules({
|
|
5194
5301
|
extended: jestOptions.extended === true,
|
|
@@ -5199,9 +5306,7 @@ function oxlintTest({ files = GLOB_TESTS, isInEditor = false, jest = false, over
|
|
|
5199
5306
|
...sonarjsTestRules({
|
|
5200
5307
|
jest: true,
|
|
5201
5308
|
roblox: isRoblox
|
|
5202
|
-
})
|
|
5203
|
-
...overrides,
|
|
5204
|
-
...jestOptions.overrides
|
|
5309
|
+
})
|
|
5205
5310
|
},
|
|
5206
5311
|
settings: { jest: {
|
|
5207
5312
|
globalPackage: "@rbxts/jest-globals",
|
|
@@ -5216,15 +5321,17 @@ function oxlintTest({ files = GLOB_TESTS, isInEditor = false, jest = false, over
|
|
|
5216
5321
|
if (enableVitest) configs.push(...createOxlintConfigs({
|
|
5217
5322
|
name: "isentinel/test/vitest",
|
|
5218
5323
|
files: vitestOptions.files?.flat() ?? files.flat(),
|
|
5324
|
+
overrides: {
|
|
5325
|
+
...overrides,
|
|
5326
|
+
...vitestOptions.overrides
|
|
5327
|
+
},
|
|
5219
5328
|
rules: {
|
|
5220
5329
|
...vitestRules({
|
|
5221
5330
|
extended: vitestOptions.extended === true,
|
|
5222
5331
|
isInEditor,
|
|
5223
5332
|
stylistic
|
|
5224
5333
|
}),
|
|
5225
|
-
...sonarjsTestRules({ roblox: isRoblox })
|
|
5226
|
-
...overrides,
|
|
5227
|
-
...vitestOptions.overrides
|
|
5334
|
+
...sonarjsTestRules({ roblox: isRoblox })
|
|
5228
5335
|
},
|
|
5229
5336
|
settings: { vitest: { typecheck: vitestOptions.typecheck ?? false } }
|
|
5230
5337
|
}), ...createOxlintConfigs({
|
|
@@ -5495,13 +5602,13 @@ function oxlintTypescript(options = {}) {
|
|
|
5495
5602
|
name: "isentinel/typescript",
|
|
5496
5603
|
...excludeFiles ? { excludeFiles } : {},
|
|
5497
5604
|
files,
|
|
5605
|
+
overrides,
|
|
5498
5606
|
rules: {
|
|
5499
5607
|
...typescriptRecommendedOverrides(),
|
|
5500
5608
|
...typescriptStrictPresetRules(),
|
|
5501
5609
|
...typescriptRules({ stylistic }),
|
|
5502
5610
|
...gatedTypeAwareRules,
|
|
5503
|
-
...erasableOnly ? erasableSyntaxOnlyRules() : {}
|
|
5504
|
-
...overrides
|
|
5611
|
+
...erasableOnly ? erasableSyntaxOnlyRules() : {}
|
|
5505
5612
|
}
|
|
5506
5613
|
});
|
|
5507
5614
|
}
|
|
@@ -5753,7 +5860,7 @@ const NATIVE_ONLY_JS_PLUGINS = /* @__PURE__ */ new Set(["oxlint-comments"]);
|
|
|
5753
5860
|
*/
|
|
5754
5861
|
function isentinel(factoryOptions, ...userConfigs) {
|
|
5755
5862
|
const options = factoryOptions ?? { name: "isentinel" };
|
|
5756
|
-
const { categories, componentExts: componentExtensions = [], e18e: enableE18e = true, env, eslintPlugin: enableEslintPlugin = false, formatters, gitignore: enableGitignore = true, globals, ignores, jsdoc: enableJsdoc = true, jsPlugins: userJsPlugins, jsx: enableJsx = true, options: linterOptions, oxc: enableOxc = true, react: enableReact = false, root: customRootGlobs, rules = {}, spellCheck: enableSpellCheck, test: enableTest = false } = options;
|
|
5863
|
+
const { categories, componentExts: componentExtensions = [], e18e: enableE18e = true, env, eslintPlugin: enableEslintPlugin = false, formatters, gitignore: enableGitignore = true, globals, ignores, jsdoc: enableJsdoc = true, jsPlugins: userJsPlugins, jsx: enableJsx = true, options: linterOptions, oxc: enableOxc = true, react: enableReact = false, root: customRootGlobs, rules = {}, spellCheck: enableSpellCheck, test: enableTest = false, warnDroppedOverrides: enableDroppedOverrideWarning = true } = options;
|
|
5757
5864
|
const rootGlobs = mergeGlobs(GLOB_ROOT, customRootGlobs);
|
|
5758
5865
|
const enableRoblox = options.roblox !== false;
|
|
5759
5866
|
const nativeOnly = userJsPlugins === false;
|
|
@@ -5938,9 +6045,12 @@ function isentinel(factoryOptions, ...userConfigs) {
|
|
|
5938
6045
|
if (override.excludeFiles !== void 0) override.excludeFiles = override.excludeFiles.map(anchorOxlintGlob);
|
|
5939
6046
|
overrides.push(override);
|
|
5940
6047
|
}
|
|
6048
|
+
const removedRules = /* @__PURE__ */ new Set();
|
|
5941
6049
|
for (const fragment of configs.flat()) {
|
|
5942
6050
|
if (nativeOnly && droppedByNativeOnly(fragment)) {
|
|
5943
6051
|
if (fragment.settings) Object.assign(mergedSettings, fragment.settings);
|
|
6052
|
+
const fragmentRules = Object.keys(fragment.rules ?? {});
|
|
6053
|
+
for (const rule of fragmentRules) removedRules.add(rule);
|
|
5944
6054
|
continue;
|
|
5945
6055
|
}
|
|
5946
6056
|
mergeFragment(fragment);
|
|
@@ -5964,12 +6074,21 @@ function isentinel(factoryOptions, ...userConfigs) {
|
|
|
5964
6074
|
});
|
|
5965
6075
|
for (const userConfig of userConfigs) mergeFragment(userConfig);
|
|
5966
6076
|
if (Array.isArray(userJsPlugins)) for (const jsPlugin of userJsPlugins) jsPlugins.set(jsPluginKey(jsPlugin), jsPlugin);
|
|
5967
|
-
if (nativeOnly)
|
|
6077
|
+
if (nativeOnly) {
|
|
6078
|
+
const stripped = stripUnregisteredPluginRules(overrides, /* @__PURE__ */ new Set([...nativePlugins, ...jsPlugins.keys()]));
|
|
6079
|
+
for (const rule of stripped) removedRules.add(rule);
|
|
6080
|
+
}
|
|
5968
6081
|
scopeOverridePlugins(overrides, globalPlugins);
|
|
5969
6082
|
if (defaultSeverity) {
|
|
5970
6083
|
const severityExcludeRules = /* @__PURE__ */ new Set(["sonar/todo-tag"]);
|
|
5971
6084
|
for (const override of overrides) if (override.rules) override.rules = overrideRuleSeverity(override.rules, defaultSeverity, severityExcludeRules);
|
|
5972
6085
|
}
|
|
6086
|
+
const { dropped, emitted } = takeOverrideDiagnostics();
|
|
6087
|
+
for (const rule of removedRules) if (emitted.has(rule)) dropped.push({
|
|
6088
|
+
reason: "native-only",
|
|
6089
|
+
rule
|
|
6090
|
+
});
|
|
6091
|
+
if (enableDroppedOverrideWarning) warnDroppedOverrides(dropped);
|
|
5973
6092
|
return defineConfig({
|
|
5974
6093
|
categories: {
|
|
5975
6094
|
...DEFAULT_CATEGORIES,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@isentinel/eslint-config",
|
|
3
|
-
"version": "6.0.0-beta.
|
|
3
|
+
"version": "6.0.0-beta.29",
|
|
4
4
|
"description": "iSentinel's ESLint config",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint-config",
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"eslint-plugin-better-max-params": "1.0.0",
|
|
77
77
|
"eslint-plugin-comment-length": "2.3.1",
|
|
78
78
|
"eslint-plugin-de-morgan": "2.1.3",
|
|
79
|
-
"eslint-plugin-flawless": "1.4.
|
|
79
|
+
"eslint-plugin-flawless": "1.4.3",
|
|
80
80
|
"eslint-plugin-format-lua": "2.0.0",
|
|
81
81
|
"eslint-plugin-import-lite": "0.6.0",
|
|
82
82
|
"eslint-plugin-jsdoc": "63.2.0",
|
|
@@ -142,7 +142,7 @@
|
|
|
142
142
|
"typescript": "6.0.3",
|
|
143
143
|
"unplugin-unused": "0.5.7",
|
|
144
144
|
"vitest": "4.1.10",
|
|
145
|
-
"@isentinel/eslint-config": "6.0.0-beta.
|
|
145
|
+
"@isentinel/eslint-config": "6.0.0-beta.29"
|
|
146
146
|
},
|
|
147
147
|
"peerDependencies": {
|
|
148
148
|
"@vitest/eslint-plugin": "^1.6.4",
|