Here"s a refined version of your README:
Note: This package requires ESLint v9 or higher and is not compatible with earlier versions. If you"re using an older version of ESLint, please upgrade to the latest release or use version 1.x of this package.
- Zero Configuration: Ready to use immediately without setup.
- Highly Customizable: Easily extendable to fit specific project needs.
To add this configuration to your project, run:
pnpm install -D eslint@9 @ariesclark/eslint-config
Copy the example configuration file into your project’s root directory:
cp node_modules/@ariesclark/eslint-config/eslint.config.mjs .
Customize eslint.config.mjs
as needed for your project.
Next.js with Tailwind.css
// eslint.config.js
import { configure } from "@ariesclark/eslint-config";
export default configure({
next: true,
tailwind: true,
typescript: {
tsconfigPath: "./tsconfig.json",
}
});
Normally you only need to import the configure preset:
// eslint.config.js
import { configure } from "@ariesclark/eslint-config";
export default configure({
/* options */
});
And that's it! Or you can configure each integration individually, for example:
// eslint.config.js
import { configure } from "@ariesclark/eslint-config";
export default configure({
// Type of the project. "lib" for libraries, the default is "app"
type: "app",
// Disable stylistic formatting rules
// stylistic: false,
// Or customize the stylistic rules
stylistic: {
indent: "tab", // "tab", or a number.
quotes: "double", // or "single"
},
// TypeScript and Vue are autodetected, you can also explicitly enable them:
typescript: true,
vue: true,
// And even, disable jsonc and yaml support.
jsonc: false,
yaml: false,
// `.eslintignore` is no longer supported in flat config, use `ignores` instead.
ignores: [
"**/fixtures",
// ...globs
]
});
To run ESLint with this configuration:
- You may need to install ESLint globally to use the
eslint
command directly, or usepnpx eslint
for a project-local setup. - When prompted to install any required plugins or parsers, follow the instructions. It’s best to complete this setup before starting your language server.
eslint .
For complex documentation, see the @antfu/eslint-config, which this package is based on.