Comments (9)
- Open
.vscode/settings.json
- Comment out "Silent the stylistic rules in you IDE, but still auto fix them" lines
// { "rule": "style/*", "severity": "off" },
- Type the code as you want and find the rule name you want to change
(in your case the error will beMissing trailing comma.eslint (style/comma-dangle)
- Add the rule (to stylistic overrides or any other override place you see fit)
export default antfu({
// ...
overrides: {
stylistic: {
'style/comma-dangle': ['error', 'never']
}
}
// ...
})
from eslint-config.
Do you mean with Prettier formatting (formatting:true) or ESLing Stylistic formatting (default, style/*
rules) @JackieCheung ?
from eslint-config.
Do you mean with Prettier formatting (formatting:true) or ESLing Stylistic formatting (default, style/*
rules) @JackieCheung ?
from eslint-config.
Do you mean with Prettier formatting (formatting:true) or ESLing Stylistic formatting (default,
style/*
rules) @JackieCheung ?
ESLing Stylistic formatting
from eslint-config.
- Open
.vscode/settings.json
- Comment out "Silent the stylistic rules in you IDE, but still auto fix them" lines
// { "rule": "style/*", "severity": "off" },
- Type the code as you want and find the rule name you want to change
(in your case the error will beMissing trailing comma.eslint (style/comma-dangle)
- Add the rule (to stylistic overrides or any other override place you see fit)
export default antfu({ // ... overrides: { stylistic: { 'style/comma-dangle': ['error', 'never'] } } // ... })
thank you, but how to configure these in Jetbrain IDE?
from eslint-config.
// readme.md
+ If you want to see what style rules are used to autoformat your code
+ (e.g. to disable them or to change their behaviour),
+ comment out the `eslint.rules.customizations` in `.vscode/settings.json`
+ (see [VS Code support (auto fix)](https://github.com/antfu/eslint-config?tab=readme-ov-file#vs-code-support-auto-fix) )
from eslint-config.
@JackieCheung skip the first two points I guess. Or start with 4. and that's it.
from eslint-config.
@JackieCheung skip the first two points I guess. Or start with 4. and that's it.
thx, in Jetbrain IDE it works fine after add
stylistic: {
overrides: {
'style/comma-dangle': ['error', 'never']
}
}
then manually format the file again, no commas will be added automatically if the file is saved later.
from eslint-config.
🤔
Honestly if this config wouldn't have so much differences from vanilla ESLint I'd just say RTFM please make sure to read the manual before asking questions https://eslint.org/docs/latest/use/configure/configuration-files-new as this doesn't have to do anything with this config itself
And it's going to closed with reason "not a bug, invalid reproduction"
from eslint-config.
Related Issues (20)
- `v2.9.1` have a peer-dependency of `eslint-plugin-svelte@^2.36.0-0`, which is not released yet HOT 2
- Conflict with @stylistic/indent and @stylistic/jsx-indent HOT 3
- Unable to use with yarn + eslint 9.0.0 HOT 9
- `'vue/require-explicit-emits'` is enabled in Vue 2 HOT 1
- Remove curly "Unnecessary { after if/for-of" autofixes from on-save formatter HOT 2
- `unocss: true` it's not working HOT 1
- Introduce `eslint-react` HOT 1
- `@unocss/eslint-config` not working for eslint@9 HOT 1
- Stricter ordering of imports HOT 5
- cli command(npx @antfu/eslint-config@latest) execute failed HOT 5
- antfu() type error HOT 2
- Conflicts with lint-staged and stylelint HOT 1
- XML formatter HOT 4
- Setting stylistic/object-property-newline breaks indentation. HOT 4
- vscode + ts + monorepo - issues with resolving `parserOptions` files in IDE (but not cli) HOT 3
- Cannot destructure property 'parent' of 'node' as it is undefined. HOT 5
- I love this config but Eslint is slow. HOT 6
- OptionsConfig.autoRenamePlugins 配置设置为 false 似乎不生效 HOT 1
- no-cond-assign seems to have except-parens disabled and turning them back on throws linting errors. HOT 1
- [Nuxt] Error: Key "plugins": Cannot redefine plugin "import". HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eslint-config.