Skip to content

Commit

Permalink
Merge branch 'ci-check-code-generation' of https://github.com/oxc-pro…
Browse files Browse the repository at this point in the history
…ject/eslint-plugin-oxlint into ci-check-code-generation
  • Loading branch information
Sysix committed Nov 20, 2024
2 parents f7e4286 + a815c2a commit 08d91ea
Show file tree
Hide file tree
Showing 8 changed files with 420 additions and 308 deletions.
2 changes: 1 addition & 1 deletion .mise.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[tools]
pnpm = "9.12.3"
pnpm = "9.13.2"
8 changes: 8 additions & 0 deletions eslint.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,13 @@ export default [
unicorn.configs['flat/recommended'],
...tseslint.configs.recommended,
eslintConfigPrettier,
{
rules: {
// https://github.com/sindresorhus/eslint-plugin-unicorn/issues/2496
'unicorn/expiring-todo-comments': 'off',
// https://github.com/eslint/eslint/issues/19134
'@typescript-eslint/no-unused-expressions': 'off',
},
},
...oxlint.buildFromOxlintConfigFile('oxlint.json'),
];
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "eslint-plugin-oxlint",
"version": "0.11.1",
"version": "0.12.0",
"description": "Turn off all rules already supported by oxlint",
"type": "module",
"types": "./dist/index.d.ts",
"packageManager": "pnpm@9.12.3",
"packageManager": "pnpm@9.13.2",
"exports": {
".": {
"types": "./dist/index.d.ts",
Expand Down Expand Up @@ -64,7 +64,7 @@
"husky": "^9.1.6",
"lint-staged": "^15.2.10",
"memfs": "^4.14.0",
"oxlint": "^0.11.1",
"oxlint": "^0.12.0",
"prettier": "^3.3.3",
"scule": "^1.3.0",
"shelljs": "^0.8.5",
Expand Down
590 changes: 295 additions & 295 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

103 changes: 103 additions & 0 deletions src/__snapshots__/configs.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@ exports[`contains all the oxlint rules 1`] = `
"@typescript-eslint/no-empty-interface": [
0,
],
"@typescript-eslint/no-empty-object-type": [
0,
],
"@typescript-eslint/no-explicit-any": [
0,
],
Expand Down Expand Up @@ -205,12 +208,18 @@ exports[`contains all the oxlint rules 1`] = `
],
"array-callback-return": [
0,
{
"allowImplicit": false,
"allowVoid": false,
"checkForEach": false,
},
],
"constructor-super": [
0,
],
"default-case": [
0,
{},
],
"default-case-last": [
0,
Expand All @@ -226,9 +235,12 @@ exports[`contains all the oxlint rules 1`] = `
],
"func-names": [
0,
"always",
{},
],
"getter-return": [
0,
{},
],
"guard-for-in": [
0,
Expand All @@ -242,6 +254,9 @@ exports[`contains all the oxlint rules 1`] = `
"import/first": [
0,
],
"import/import-no-namespace": [
0,
],
"import/max-dependencies": [
0,
],
Expand Down Expand Up @@ -592,6 +607,9 @@ exports[`contains all the oxlint rules 1`] = `
],
"no-bitwise": [
0,
{
"allow": [],
},
],
"no-caller": [
0,
Expand All @@ -607,9 +625,11 @@ exports[`contains all the oxlint rules 1`] = `
],
"no-cond-assign": [
0,
"except-parens",
],
"no-console": [
0,
{},
],
"no-const-assign": [
0,
Expand All @@ -619,6 +639,9 @@ exports[`contains all the oxlint rules 1`] = `
],
"no-constant-condition": [
0,
{
"checkLoops": "allExceptWhileTrue",
},
],
"no-constructor-return": [
0,
Expand Down Expand Up @@ -652,18 +675,28 @@ exports[`contains all the oxlint rules 1`] = `
],
"no-else-return": [
0,
{
"allowElseIf": true,
},
],
"no-empty": [
0,
{
"allowEmptyCatch": false,
},
],
"no-empty-character-class": [
0,
],
"no-empty-function": [
0,
{
"allow": [],
},
],
"no-empty-pattern": [
0,
{},
],
"no-empty-static-block": [
0,
Expand All @@ -673,36 +706,57 @@ exports[`contains all the oxlint rules 1`] = `
],
"no-eval": [
0,
{},
],
"no-ex-assign": [
0,
],
"no-extend-native": [
0,
{
"exceptions": [],
},
],
"no-extra-boolean-cast": [
0,
{},
],
"no-fallthrough": [
0,
{
"allowEmptyCase": false,
"reportUnusedFallthroughComment": false,
},
],
"no-func-assign": [
0,
],
"no-global-assign": [
0,
{
"exceptions": [],
},
],
"no-import-assign": [
0,
],
"no-inner-declarations": [
0,
"functions",
],
"no-invalid-regexp": [
0,
{},
],
"no-irregular-whitespace": [
0,
{
"skipComments": false,
"skipJSXText": false,
"skipRegExps": false,
"skipStrings": true,
"skipTemplates": false,
},
],
"no-iterator": [
0,
Expand Down Expand Up @@ -739,6 +793,7 @@ exports[`contains all the oxlint rules 1`] = `
],
"no-plusplus": [
0,
{},
],
"no-proto": [
0,
Expand All @@ -748,6 +803,9 @@ exports[`contains all the oxlint rules 1`] = `
],
"no-redeclare": [
0,
{
"builtinGlobals": true,
},
],
"no-regex-spaces": [
0,
Expand All @@ -757,12 +815,16 @@ exports[`contains all the oxlint rules 1`] = `
],
"no-return-assign": [
0,
"except-parens",
],
"no-script-url": [
0,
],
"no-self-assign": [
0,
{
"props": true,
},
],
"no-self-compare": [
0,
Expand Down Expand Up @@ -790,6 +852,7 @@ exports[`contains all the oxlint rules 1`] = `
],
"no-undef": [
0,
{},
],
"no-undefined": [
0,
Expand All @@ -805,9 +868,11 @@ exports[`contains all the oxlint rules 1`] = `
],
"no-unsafe-negation": [
0,
{},
],
"no-unsafe-optional-chaining": [
0,
{},
],
"no-unused-labels": [
0,
Expand All @@ -832,12 +897,14 @@ exports[`contains all the oxlint rules 1`] = `
],
"no-useless-rename": [
0,
{},
],
"no-var": [
0,
],
"no-void": [
0,
{},
],
"no-with": [
0,
Expand Down Expand Up @@ -889,6 +956,10 @@ exports[`contains all the oxlint rules 1`] = `
],
"radix": [
0,
"always",
],
"react-hooks/exhaustive-deps": [
0,
],
"react-hooks/rules-of-hooks": [
0,
Expand Down Expand Up @@ -1000,12 +1071,32 @@ exports[`contains all the oxlint rules 1`] = `
],
"sort-imports": [
0,
{
"allowSeparatedGroups": false,
"ignoreCase": false,
"ignoreDeclarationSort": false,
"ignoreMemberSort": false,
"memberSyntaxSortOrder": [
"none",
"all",
"multiple",
"single",
],
},
],
"sort-keys": [
0,
"asc",
{
"allowLineSeparatedGroups": false,
"caseSensitive": true,
"minKeys": 2,
"natural": false,
},
],
"sort-vars": [
0,
{},
],
"symbol-description": [
0,
Expand All @@ -1015,13 +1106,17 @@ exports[`contains all the oxlint rules 1`] = `
],
"unicode-bom": [
0,
"never",
],
"unicorn/catch-error-name": [
0,
],
"unicorn/consistent-empty-array-spread": [
0,
],
"unicorn/consistent-existence-index-check": [
0,
],
"unicorn/consistent-function-scoping": [
0,
],
Expand Down Expand Up @@ -1247,6 +1342,9 @@ exports[`contains all the oxlint rules 1`] = `
"unicorn/prefer-spread": [
0,
],
"unicorn/prefer-string-raw": [
0,
],
"unicorn/prefer-string-replace-all": [
0,
],
Expand Down Expand Up @@ -1282,9 +1380,14 @@ exports[`contains all the oxlint rules 1`] = `
],
"use-isnan": [
0,
{
"enforceForIndexOf": false,
"enforceForSwitchCase": true,
},
],
"valid-typeof": [
0,
{},
],
"vitest/no-conditional-tests": [
0,
Expand Down
9 changes: 0 additions & 9 deletions src/build-from-oxlint-config.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -271,15 +271,6 @@ const executeOxlintWithConfiguration = (
'--silent',
];

// --disabled-<foo>-plugin can be removed after oxc-project/oxc#6896
if (config.plugins !== undefined) {
for (const plugin of ['typescript', 'unicorn', 'react']) {
if (!config.plugins!.includes(plugin)) {
cliArguments.push(`--disable-${plugin}-plugin`);
}
}
}

try {
oxlintOutput = execSync(`npx oxlint ${cliArguments.join(' ')}`, {
encoding: 'utf8',
Expand Down
Loading

0 comments on commit 08d91ea

Please sign in to comment.