Giter VIP home page Giter VIP logo

Comments (9)

Dimava avatar Dimava commented on June 15, 2024 1
  1. Open .vscode/settings.json
  2. Comment out "Silent the stylistic rules in you IDE, but still auto fix them" lines
    // { "rule": "style/*", "severity": "off" },
  3. Type the code as you want and find the rule name you want to change
    (in your case the error will be Missing trailing comma.eslint (style/comma-dangle)
  4. 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.

Dimava avatar Dimava commented on June 15, 2024

Do you mean with Prettier formatting (formatting:true) or ESLing Stylistic formatting (default, style/* rules) @JackieCheung ?

from eslint-config.

Dimava avatar Dimava commented on June 15, 2024

Do you mean with Prettier formatting (formatting:true) or ESLing Stylistic formatting (default, style/* rules) @JackieCheung ?

from eslint-config.

JackieCheung avatar JackieCheung commented on June 15, 2024

Do you mean with Prettier formatting (formatting:true) or ESLing Stylistic formatting (default, style/* rules) @JackieCheung ?

ESLing Stylistic formatting

from eslint-config.

JackieCheung avatar JackieCheung commented on June 15, 2024
  1. Open .vscode/settings.json
  2. Comment out "Silent the stylistic rules in you IDE, but still auto fix them" lines
    // { "rule": "style/*", "severity": "off" },
  3. Type the code as you want and find the rule name you want to change
    (in your case the error will be Missing trailing comma.eslint (style/comma-dangle)
  4. 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.

Dimava avatar Dimava commented on June 15, 2024
// 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.

Dimava avatar Dimava commented on June 15, 2024

@JackieCheung skip the first two points I guess. Or start with 4. and that's it.

from eslint-config.

JackieCheung avatar JackieCheung commented on June 15, 2024

@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.

Dimava avatar Dimava commented on June 15, 2024

🤔
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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.