-
-
Notifications
You must be signed in to change notification settings - Fork 394
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
linter: support .eslintrc
config files
#636
Comments
This is open for contributions, we need to port eslint configurations. The only downside is that we can only read json files when running the Rust binary. I'm not sure about the new flat config system or nested eslint configurations, but we can start simple by only reading the config file from the current working directory or use a Reading other file formats can be figured out later, for example "run" the js file and get its exported configuration in a js wrapper, and then pass it to our Rust binary. |
@camc314 If you want something challenging other than implementing lint rules. This is something we need to be closer to v1.0.0. I've also granted you write access to this repo so you can push branches into this repo. |
There is a little hint on how this can be achieved: But you are free to architect this differently. |
👍 Thanks! i'll take a look and have a think 🙂 |
Did that support ESLint flat config? The newest ESLint version only support eslint.config.js |
@webfanzc Are you already using eslint flat config? Can you show me how you are using it? |
It's my config const antfu = require('@antfu/eslint-config').default
module.exports = antfu(
{
unocss: true,
ignores: [
'.DS_Store',
'**/.DS_Store/**',
'.vscode',
'**/.vscode/**',
'.vite-ssg-dist',
'**/.vite-ssg-dist/**',
'.vite-ssg-temp',
'**/.vite-ssg-temp/**',
'*.local',
'**/*.local/**',
'dist',
'**/dist/**',
'dist-ssr',
'**/dist-ssr/**',
'build',
'**/build/**',
'public',
'**/public/**',
'node_modules',
'**/node_modules/**',
'.idea/',
'**/.idea/**/',
'*.log',
'**/*.log/**',
'sourcemaps',
'**/sourcemaps/**',
'coverage',
'**/coverage/**'
]
},
{
rules: {
'vue/component-name-in-template-casing': ['error', 'kebab-case', {
registeredComponentsOnly: true
}],
'vue/max-attributes-per-line': ['error', {
singleline: {
max: 3
},
multiline: {
max: 2
}
}],
'ts/ban-ts-ignore': 'off',
'ts/explicit-function-return-type': 'off',
'ts/no-explicit-any': 'off',
'ts/no-namespace': 'off',
'ts/no-var-requires': 'off',
'ts/no-empty-function': 'off',
'ts/prefer-ts-expect-error': 'off',
'vue/custom-event-name-casing': 'off',
'eslint-comments/no-unlimited-disable': 'off',
'no-use-before-define': 'off',
// 'no-use-before-define': [
// 'error',
// {
// functions: false,
// classes: true,
// },
// ],
'ts/no-use-before-define': 'off',
// 'ts/no-use-before-define': [
// 'error',
// {
// functions: false,
// classes: true,
// },
// ],
'ts/ban-ts-comment': 'off',
'ts/ban-types': 'off',
'ts/no-non-null-assertion': 'off',
'ts/explicit-module-boundary-types': 'off',
'ts/comma-dangle': ['error', 'never'],
// 'ts/indent': 0,
'ts/no-unused-vars': [
'off',
{
argsIgnorePattern: '^h$',
varsIgnorePattern: '^h$'
}
],
'no-unused-vars': [
'off',
{
argsIgnorePattern: '^h$',
varsIgnorePattern: '^h$'
}
],
'space-before-function-paren': 0,
'quotes': ['error', 'single'],
'style/comma-dangle': ['error', 'never'],
'no-tabs': ['error', { allowIndentationTabs: true }]
}
}
) |
Most users are migrating from ESLint and have configs they like for their projects.
oxlint
should be able to parse.eslintrc
and.eslintrc.json
files intoLinterOptions
.The text was updated successfully, but these errors were encountered: