3.0.1 • Published 1 year ago
@sn0wye/eslint-config v3.0.1
Sn0wye ESLint config
Whats included?
- React plugin;
- React Hooks plugin;
- JSX a11y plugin;
Setup
- Install the dependencies
pnpm i eslint @sn0wye/eslint-config -D
- Create a
.eslintrc.cjs
or file extending the config:
const path = require('path');
/** @type {import("eslint").Linter.Config} */
module.exports = {
extends: ['@sn0wye/eslint-config/react'],
parser: '@typescript-eslint/parser',
parserOptions: {
project: path.join(__dirname, 'tsconfig.json')
}
};
- Add the linting scripts
// package.json
"scripts": {
// ...,
"lint": "eslint src --ext ts,tsx",
"lint:fix": "eslint src --ext ts,tsx --fix",
}