@alergeek-ventures/eslint-config
v9.0.35
Published
- our way of ensuring code consistency - no styling rules - use with `prettier` - available flavors 🍧: - `vanilla` (Javascript + imports) - `typescript` (uses `@typescript-eslint` suite) - `react` (react, JSX, hooks) - `react-native` (react, reac
Downloads
1,225
Readme
AV's ESLint configuration
- our way of ensuring code consistency
- no styling rules - use with
prettier
- available flavors 🍧:
vanilla
(Javascript + imports)typescript
(uses@typescript-eslint
suite)react
(react, JSX, hooks)react-native
(react, react-native, a11y)tests
(integration / unit tests via@testing-library
andjest
)cypress
(e2e tests)cspell-eslint
(spell checking)
how to use
# .eslintrc.js
module.exports = {
env: {
node: true,
commonjs: true,
jest: true,
},
extends: ["./vanilla.js", "./typescript.js", "./react.js", "./tests.js"],
parser: "@typescript-eslint/parser",
root: true,
parserOptions: {
/* eslint-disable-next-line @typescript-eslint/no-unsafe-assignment */
tsconfigRootDir: __dirname,
project: ["./tsconfig.json"],
},
settings: {
react: {
version: "detect",
},
},
};
Cspell
Create .cspell.json file if you want to use spell checking
{
"import": ["@alergeek-ventures/eslint-config/.cspell.json"],
"dictionaries": ["customWords"],
"dictionaryDefinitions": [
{ "name": "customWords", "path": "path/to/your/custom/dictionary" }
]
}