@oliver139/eslint-config
v1.1.1
Published
Oliver's ESLint config preset powered by @antfu/eslint-config
Downloads
207
Readme
@oliver139/eslint-config
Oliver's ESLint config preset powered by @antfu/eslint-config
- ESLint Flat Config is used
- Requires ESLint
v9.10.0+
- Support Vanilla or VueJS only
- Optional Vue-A11y support
- Able to change quote style and whether using semicolon or not
Usage
Install
pnpm add -D @oliver139/eslint-config
And create eslint.config.mjs
in your project root:
// eslint.config.mjs
import { eslintConfigBuilder } from "@oliver139/eslint-config";
export default await eslintConfigBuilder();
Customize
Parameters can be passed to the function to customize a bit the style and this is the default setting:
// eslint.config.mjs
import { eslintConfigBuilder } from "@oliver139/eslint-config";
export default await eslintConfigBuilder({
// Type of the project. 'lib' for libraries, the default is 'app'
// Check out @antfu/eslint-config for more
type: "app",
// Whether including the vue-a11y plugin or not
vueA11y: false,
// Quote style
quotes: "double", // or "single"
// Add semicolon or not
semicolon: true,
});
Add script for package.json
For example:
{
"scripts": {
"lint": "eslint .",
"lint:fix": "eslint . --fix"
}
}
Development
Project Setup
pnpm install
pnpm link .
Inspect ESLint Config
Will build before inspect
pnpm lint:inspect
Build the project with Rollup
pnpm build