-
-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plugin doesn't check for typescript rules #226
Comments
Hello, you are writing about |
My bad, issue was originally about Oxlint config {
"$schema": "./node_modules/oxlint/configuration_schema.json",
// "categories": {
// "correctness": "off",
// "nursery": "off",
// "pedantic": "off",
// "perf": "off",
// "restriction": "off",
// "style": "off",
// "suspicious": "off"
// },
"rules": {
"no-unused-vars": "error",
"no-console": "off",
"no-explicit-any": "error",
"prefer-as-const": "error",
"no-dynamic-delete": "error",
"no-var-requires": "error"
}
} eslint config // @ts-check
import { buildFromOxlintConfigFile } from 'eslint-plugin-oxlint'
import withNuxt from './.nuxt/eslint.config.mjs'
export default withNuxt(
{
files: ['**/*.ts', '**/*.vue'],
rules: {
'no-console': 'off',
'@stylistic/brace-style': ['error', '1tbs', { allowSingleLine: true }],
'@typescript-eslint/no-unused-vars': ['error', {
caughtErrors: 'none',
}],
'@typescript-eslint/no-extraneous-class': 'off',
'vue/max-attributes-per-line': [
'error',
{
singleline: {
max: 2,
},
multiline: {
max: 1,
},
},
],
'vue/component-name-in-template-casing': [
'error',
'PascalCase',
{
// registeredComponentsOnly: false,
ignores: ['nuxt-link'],
},
],
'vue/attributes-order': [
'error',
{
order: [
// 'is', 'v-is'
'DEFINITION',
// 'v-for'
'LIST_RENDERING',
// 'v-if', 'v-else-if', 'v-else', 'v-show', 'v-cloak'
'CONDITIONALS',
// 'v-once', 'v-pre'
'RENDER_MODIFIERS',
// 'id'
'GLOBAL',
// 'ref', 'key' | 'v-slot', 'slot'
['UNIQUE', 'SLOT'],
// 'v-model'
'TWO_WAY_BINDING',
// 'v-custom-directive'
'OTHER_DIRECTIVES',
// 'boolean-prop'
'ATTR_SHORTHAND_BOOL',
// 'prop="foo"', 'custom-prop="foo"'
'ATTR_STATIC',
// 'v-bind:prop="foo"', ':prop="foo"'
'ATTR_DYNAMIC',
// '@click="functionCall"', 'v-on="event"'
'EVENTS',
// 'v-text', 'v-html'
'CONTENT',
],
alphabetical: true,
},
],
'vue/html-self-closing': [
'error',
{
html: {
void: 'any',
normal: 'always',
component: 'always',
},
svg: 'always',
math: 'always',
},
],
'import/named': 'off',
'vue/html-indent': [
'error',
2,
{
attribute: 1,
baseIndent: 1,
closeBracket: 0,
alignAttributesVertically: true,
ignores: [],
},
],
'vue/component-definition-name-casing': ['error', 'PascalCase'],
'vue/match-component-file-name': [
'warn',
{
extensions: ['vue'],
shouldMatchCase: false,
},
],
'vue/order-in-components': [
'error',
{
order: [
'el',
'name',
'key',
'parent',
'functional',
['delimiters', 'comments'],
['components', 'directives', 'filters'],
'extends',
'mixins',
['provide', 'inject'],
'ROUTER_GUARDS',
'layout',
'middleware',
'validate',
'scrollToTop',
'transition',
'loading',
'inheritAttrs',
'model',
['props', 'propsData'],
'emits',
'setup',
'asyncData',
'data',
'fetch',
'head',
'computed',
'watch',
'watchQuery',
'LIFECYCLE_HOOKS',
'methods',
['template', 'render'],
'renderError',
],
},
],
'no-void': ['error', { allowAsStatement: true }],
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/no-unused-expressions': ['error', { allowShortCircuit: true }],
},
},
...buildFromOxlintConfigFile('./.oxlintrc.json'),
) |
@DonIsaac is this expected and is the same for other plugins too? |
Some of the typescript-extended rules are inherently supported by |
@drvn-mr moved your issue to a own ticket. This issue is about the different supported names in EDIT: this is expected in oxlint and a bug in this library. thanks for reporting |
My eslint config has typescript rule
eslint-plugin-oxlint is configured in eslint.config
When I run
npx oxlint -c .oxlintrc.json || npx eslint
unused var rule appear both in oxlint and eslint log. Same file, same line.oxlint log
eslint log
The text was updated successfully, but these errors were encountered: