diff --git a/scripts/generate.ts b/scripts/generate.ts index 9a1b7bf..0b3e7b7 100644 --- a/scripts/generate.ts +++ b/scripts/generate.ts @@ -19,7 +19,10 @@ const configGenerator = new ConfigGenerator(successResultArray); const generateFolder = path.resolve(__dirname, '..', `src/generated`); -fs.mkdirSync(generateFolder); +if (!fs.existsSync(generateFolder)) { + fs.mkdirSync(generateFolder); +} + for (const generator of [rulesGenerator, configGenerator]) { generator.setRulesGrouping(RulesGrouping.SCOPE); await generator.generateRules(generateFolder); diff --git a/src/__snapshots__/build-from-oxlint-config.spec.ts.snap b/src/__snapshots__/build-from-oxlint-config.spec.ts.snap index d4e0c97..8d79c9c 100644 --- a/src/__snapshots__/build-from-oxlint-config.spec.ts.snap +++ b/src/__snapshots__/build-from-oxlint-config.spec.ts.snap @@ -151,7 +151,6 @@ exports[`buildFromOxlintConfig > default plugins (react, unicorn, typescript), d "no-useless-escape": "off", "no-useless-rename": "off", "no-with": "off", - "react/iframe-missing-sandbox": "off", "react/jsx-key": "off", "react/jsx-no-duplicate-props": "off", "react/jsx-no-target-blank": "off", diff --git a/src/generated/rules-by-category.ts b/src/generated/rules-by-category.ts index 319c8b7..48e67b2 100644 --- a/src/generated/rules-by-category.ts +++ b/src/generated/rules-by-category.ts @@ -113,12 +113,14 @@ const restrictionRules = { 'no-void': 'off', 'unicode-bom': 'off', 'import/no-amd': 'off', + 'import/no-commonjs': 'off', 'import/no-cycle': 'off', 'import/no-default-export': 'off', 'import/no-dynamic-require': 'off', 'import/no-webpack-loader-syntax': 'off', 'jsdoc/check-access': 'off', 'jsdoc/empty-tags': 'off', + 'node/no-new-require': 'off', 'promise/catch-or-return': 'off', 'promise/spec-only': 'off', 'react/button-has-type': 'off', @@ -166,6 +168,7 @@ const styleRules = { 'no-ternary': 'off', 'prefer-exponentiation-operator': 'off', 'prefer-numeric-literals': 'off', + 'prefer-object-has-own': 'off', 'sort-imports': 'off', 'sort-keys': 'off', 'jest/consistent-test-it': 'off', @@ -379,7 +382,6 @@ const correctnessRules = { 'promise/no-callback-in-promise': 'off', 'promise/no-new-statics': 'off', 'promise/valid-params': 'off', - 'react/iframe-missing-sandbox': 'off', 'react/jsx-key': 'off', 'react/jsx-no-duplicate-props': 'off', 'react/jsx-no-target-blank': 'off', @@ -440,8 +442,10 @@ const suspiciousRules = { 'import/no-named-as-default-member': 'off', 'import/no-self-import': 'off', 'jest/no-commented-out-tests': 'off', + 'react/iframe-missing-sandbox': 'off', 'react/jsx-no-comment-textnodes': 'off', 'react/react-in-jsx-scope': 'off', + 'react/style-prop-object': 'off', '@typescript-eslint/no-confusing-non-null-assertion': 'off', '@typescript-eslint/no-extraneous-class': 'off', '@typescript-eslint/no-unnecessary-type-constraint': 'off', diff --git a/src/generated/rules-by-scope.ts b/src/generated/rules-by-scope.ts index 83617ad..9ea72f1 100644 --- a/src/generated/rules-by-scope.ts +++ b/src/generated/rules-by-scope.ts @@ -104,6 +104,7 @@ const eslintRules = { 'no-with': 'off', 'prefer-exponentiation-operator': 'off', 'prefer-numeric-literals': 'off', + 'prefer-object-has-own': 'off', radix: 'off', 'require-await': 'off', 'require-yield': 'off', @@ -172,6 +173,7 @@ const importRules = { 'import/named': 'off', 'import/namespace': 'off', 'import/no-amd': 'off', + 'import/no-commonjs': 'off', 'import/no-cycle': 'off', 'import/no-default-export': 'off', 'import/no-deprecated': 'off', @@ -311,6 +313,7 @@ const nextjsRules = { const nodeRules = { 'node/no-exports-assign': 'off', + 'node/no-new-require': 'off', } as const; const promiseRules = { @@ -355,6 +358,7 @@ const reactRules = { 'react/require-render-return': 'off', 'react/rules-of-hooks': 'off', 'react/self-closing-comp': 'off', + 'react/style-prop-object': 'off', 'react/void-dom-elements-no-children': 'off', } as const;