Skip to content

Autofix @stylistic errors #14

Answered by fasttime
bckthomas asked this question in Q&A
Discussion options

You must be logged in to vote

It looks like you are using two fixable rules with conflicting settings. Note that the @stylistic/recommended-extends config will set

'@stylistic/semi': ['error', 'never']

while your config file sets

'@stylistic/js/semi': ['error', 'always']

This results in a situation where ESLint cannot apply fixes automatically. Since you are relying on recommended @stylistic rules, I would use only those rules and not the corresponding ones from @stylistic/js. You could update your config file like this:

import globals from "globals";
import path from "node:path";
import { fileURLToPath } from "node:url";
import js from "@eslint/js";
import { FlatCompat } from "@eslint/eslintrc";
import stylistic from 

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@bckthomas
Comment options

Answer selected by bckthomas
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants