npm install --save-dev jakelintIn the root directory of your project, create a file named eslint.config.js with the following content:
export { default } from 'jakelint';This ensures that ESLint automatically loads the configuration provided by jakelint when executed.
It is recommended to add the following scripts to your package.json for easier linting:
"scripts": {
"lint": "eslint -c eslint.config.js",
"lint:fix": "eslint --fix -c eslint.config.js"
}You can specify files or directories to lint when running the command, for example:
npm run lintIf you need to specify a TypeScript configuration file (default is tsconfig.json), you can override it in eslint.config.mjs. For example, if you want to use a custom TypeScript configuration file:
import baseConfig from 'jakelint';
export default [
...baseConfig,
{
languageOptions: {
parserOptions: {
project: './your-tsconfig.json'
}
}
}
];npx eslint . --ext .js,.jsx,.ts,.tsx,.vuenpx eslint . --ext .js,.jsx,.ts,.tsx,.vue --fixIf you have any suggestions or improvements, feel free to submit a Pull Request or open an Issue!
