eslint-plugin-oxlint
Advanced tools
Comparing version 0.1.0 to 0.2.0
{ | ||
"name": "eslint-plugin-oxlint", | ||
"version": "0.1.0", | ||
"version": "0.2.0", | ||
"description": "Turn off all rules already supported by oxlint", | ||
@@ -41,3 +41,3 @@ "type": "module", | ||
"eslint-plugin-unicorn": "^50.0.1", | ||
"oxlint": "^0.0.22", | ||
"oxlint": "^0.2.0", | ||
"tsx": "^4.7.0", | ||
@@ -44,0 +44,0 @@ "typescript": "^5.3.3" |
33
rules.js
@@ -87,3 +87,4 @@ // These rules are automatically generated by scripts/generate-rules.ts | ||
"@typescript-eslint/no-var-requires": "off", | ||
"@typescript-eslint/prefer-as-const": "off" | ||
"@typescript-eslint/prefer-as-const": "off", | ||
"@typescript-eslint/triple-slash-reference": "off" | ||
} | ||
@@ -111,2 +112,3 @@ | ||
"jest/no-test-prefixes": "off", | ||
"jest/no-test-return-statement": "off", | ||
"jest/prefer-todo": "off", | ||
@@ -209,2 +211,3 @@ "jest/valid-describe-callback": "off", | ||
"react/no-dangerously-set-inner-html": "off", | ||
"react/no-direct-mutation-state": "off", | ||
"react/no-find-dom-node": "off", | ||
@@ -214,3 +217,5 @@ "react/no-render-return-value": "off", | ||
"react/no-unescaped-entities": "off", | ||
"react/no-is-mounted": "off" | ||
"react/no-is-mounted": "off", | ||
"react/no-unknown-property": "off", | ||
"react/require-render-return": "off" | ||
} | ||
@@ -246,8 +251,27 @@ | ||
"jsx-a11y/prefer-tag-over-role": "off", | ||
"jsx-a11y/role-has-required-aria-props": "off", | ||
"jsx-a11y/scope": "off", | ||
"jsx-a11y/tab-index-no-positive": "off", | ||
"jsx-a11y/aria-role": "off", | ||
"jsx-a11y/no-distracting-elements": "off" | ||
"jsx-a11y/no-distracting-elements": "off", | ||
"jsx-a11y/role-support-aria-props": "off", | ||
"jsx-a11y/autocomplete-valid": "off" | ||
} | ||
const nextjsRules = { | ||
"nextjs/google-font-display": "off", | ||
"nextjs/google-font-preconnect": "off", | ||
"nextjs/inline-script-id": "off", | ||
"nextjs/next-script-for-ga": "off", | ||
"nextjs/no-assign-module-variable": "off", | ||
"nextjs/no-async-client-component": "off", | ||
"nextjs/no-css-tags": "off", | ||
"nextjs/no-head-import-in-document": "off", | ||
"nextjs/no-img-element": "off", | ||
"nextjs/no-script-component-in-head": "off", | ||
"nextjs/no-sync-scripts": "off", | ||
"nextjs/no-title-in-document-head": "off" | ||
} | ||
export { | ||
@@ -260,3 +284,4 @@ eslintRules, | ||
importRules, | ||
jsxA11yRules | ||
jsxA11yRules, | ||
nextjsRules | ||
} |
import axios from 'axios' | ||
import { writeFileSync } from 'node:fs' | ||
import path from 'node:path' | ||
import { getLatestOxlintVersion } from './oxlint-version.js'; | ||
@@ -8,3 +9,9 @@ | ||
const oxlintRulesUrl = "https://raw.githubusercontent.com/oxc-project/oxc/main/crates/oxc_linter/src/rules.rs" | ||
const oxlintVersion = await getLatestOxlintVersion(); | ||
console.log("Generating rules for " + oxlintVersion) | ||
const oxlintRulesUrl = `https://raw.githubusercontent.com/oxc-project/oxc/${oxlintVersion}/crates/oxc_linter/src/rules.rs`; | ||
const RulesRe = /oxc_macros::declare_all_lint_rules.*{([^*]*),\s*}/gm | ||
@@ -11,0 +18,0 @@ const rulesMap = new Map<string, Array<string>>() |
Sorry, the diff of this file is not supported yet
38629
12
709