...And it's this kind of November. America, an anxiety disorder. Violent backlash almost certain, varietals both comic and tragic.
Something entirely unrelated. eslint
version 9.
Upgrading eslint
, or "make-work" #
I love tooling. #eslint has been ubiquitous for so long, the standard and the standard. But OSS is evolve or die, and sometimes both.
The upgrade path between eslint
8 -> 9 is rocky enough that it simply doesn't
look worth the squeeze, to me. For a new project, the choice is obvious (9), but
I've had little success using the migration tools.
$ npx @eslint/migrate-config .eslintrc.json
Attempts #
Given the scope of linting configuration, I'm probably better off declaring linter bankruptcy and simply starting over. Yeah, that's it, this is make-work.
// @ts-check
import eslint from '@eslint/js'
import tseslint from 'typescript-eslint'
export default tseslint.config(
eslint.configs.recommended,
...tseslint.configs.recommended,
...tseslint.configs.recommendedTypeChecked,
{
rules: {
'@typescript-eslint/no-unsafe-assignment': 'warn',
'@typescript-eslint/no-unused-vars': [
'warn',
{ argsIgnorePattern: '^_' },
],
},
},
{
languageOptions: {
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname,
},
},
},
{
files: ['**/*.js', '**/*.mjs'],
...tseslint.configs.disableTypeChecked,
}
)
Text editing #
Given the advent of mjs
and cjs
, make sure your tooling recognizes those
file extensions when looking for configuration files.