This repository has been archived by the owner on Aug 14, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 101
Compatibility with new eslint config spec #307
Comments
Two years later and the |
Some more searching and I stumbled across the compatibility helpers that allow this project to be used with flat config. Example: import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';
import eslintConfigPrettier from "eslint-config-prettier";
import { FlatCompat } from "@eslint/eslintrc";
import path from "path";
import { fileURLToPath } from "url";
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname
});
export default tseslint.config(
eslint.configs.recommended,
...compat.extends("airbnb-base"),
...compat.extends("airbnb-typescript/base"),
...tseslint.configs.recommendedTypeChecked,
eslintConfigPrettier,
{
languageOptions: {
parserOptions: {
project: true,
tsconfigRootDir: import.meta.dirname,
},
},
},
{
files: ['**/*.{js,jsx,cjs,mjs}'],
extends: [tseslint.configs.disableTypeChecked],
}
); My setup based on this one works. 🙏 |
I'll make a PR to add this documentation. Thanks for bringing it up, @samuelneff! |
jrolfs
pushed a commit
to jrolfs/eslint-config-airbnb-typescript
that referenced
this issue
Aug 16, 2024
- Explicitly note the lack of ESLint 9 support, link to tracking ticket. - Provide flat configuration instructions (and recommend their use). - Update instructions for NPM v7 automatically installing peer dependencies. - Update configuration for use with typescript-eslint v8. - Some restructuring for readability. - Added instructions for removing formatting rules, since it's less simple with the ESLint stylistic rules (until the Prettier config gets updated). Closes iamturns#307
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Eslint announced a new config spec.
https://eslint.org/docs/latest/user-guide/configuring/configuration-files-new
According to eslint's official blog, though backward compatibility was taken care of, not all shareable configs continue to work with the new config system.
Are
eslint-config-airbnb-typescript
andeslint-config-airbnb-typescript/base
compatible with the new config?Thanks.
The text was updated successfully, but these errors were encountered: