standard / eslint-config-standard

ESLint Config for JavaScript Standard Style

Home Page:https://standardjs.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

feat: eslint 9 compatibility

jkowalleck opened this issue · comments

Hi guys!

Please tell us if eslint-config-standard is compatible with the new version of ESlint?
and if yes please add it to peerDependencies

It does not, but stay tuned

Hi Guys! Do you have any timeframes here?

The only way to make this package work, for now, is to copy this section and put it in the eslint.config.js manually. Everything works fine then 😅

Just wanted to share how I got eslint-config-standard working with eslint@9.

install dev dependencies

npm i -D eslint@^9 eslint-config-standard@^17 eslint-plugin-import@^2 eslint-plugin-n@^17 eslint-plugin-promise@^6

then change eslint.config.js

import globals from 'globals'
import pluginJs from '@eslint/js'
import standard from 'eslint-config-standard'
import pluginN from 'eslint-plugin-n'
import pluginPromise from 'eslint-plugin-promise'
import pluginImport from 'eslint-plugin-import'

const config = [
  {
    files: ['**/*.{js,mjs,cjs}'],
    languageOptions: {
      globals: {
        ...globals.mocha, // I am using mocha, remove if not needed...
        ...globals.node,
      }
    }
  },
  pluginJs.configs.recommended,
  {
    plugins: {
      n: pluginN,
      import: pluginImport,
      promise: pluginPromise
    },
    rules: standard.rules
  },
  {
    ignores: ['coverage/', 'dist/', 'lib/']
  }
]

export default config

It does not, but stay tuned

Since we couldn't reach a conclusion on governance (standard/standard#1948 (comment)) some of us are today launching an alternative project today that aims to carry the torch forward in the same spirit as standard but under an open governance model: neostandard

It brings support for ESLint 9 and flat configs from the start, as well as eg. TypeScript support, semistandard support and option for a style-less setup.

That's sadly where I will focus my efforts from now on.