6.4.2 • Published 1 year ago
@djthoms/eslint-config v6.4.2
@djthoms/eslint-config
My eslint config settings.
Usage
npm i eslint prettier @djthoms/eslint-config --save-dev
Plugins
- eslint-config-prettier
- eslint-plugin-flowtype
- eslint-plugin-import
- eslint-plugin-jsx-a11y
- eslint-plugin-prettier
- eslint-plugin-react
- eslint-plugin-react-hooks
- eslint-plugin-jest
- eslint-plugin-testing-library
- eslint-plugin-security
- eslint-plugin-vitest
- eslint-plugin-solid
Parsers
- @babel/eslint-parser
- @typescript-eslint/parser
Sample usage with typescript + react
module.exports = {
env: {
browser: true,
node: true,
jest: true,
es6: true,
},
extends: [
"@djthoms/eslint-config",
"@djthoms/eslint-config/react",
"@djthoms/eslint-config/react-typescript",
"@djthoms/eslint-config/typescript",
],
};
Run through CLI:
npx eslint src/**/*.{ts,tsx}
Sample usage using flow + react
module.exports = {
env: {
browser: true,
node: true,
jest: true,
es6: true,
},
extends: [
"@djthoms/eslint-config",
"@djthoms/eslint-config/esmodules",
"@djthoms/eslint-config/react",
"@djthoms/eslint-config/flow",
],
};
Run through CLI:
npx eslint 'src/**/*.{js,jsx}'
Available Configurations
This package comes with several configurations. They're detailed below:
Export | Description |
---|---|
@djthoms/eslint-config | Main export form the package. This sets up eslint with the recommended config and prettier |
@djthoms/eslint-config/esmodules | Sets @babel/eslint-parser as the parser, es6 env, modules, and the ecmaVersion to 2018 |
@djthoms/eslint-config/jest | A generic config for writing jest tests with testing-library |
@djthoms/eslint-config/react | A generic config for react projects that combines multiple react eslint plugins for accessibility, JSX, and more. Use with esmodules or typescript, but not both |
@djthoms/eslint-config/react-typescript | React .tsx overrides |
@djthoms/eslint-config/flow | A generic flow config that can be used with or without React |
@djthoms/eslint-config/typescript | A generic typescript config that sets up @typescript-eslint/parser as the parser and can be used with or without React |
@djthoms/eslint-config/vitest | A generic vitest config |
@djthoms/eslint-config/solid | A config that works with solid.js |
6.4.2
1 year ago
6.4.1
1 year ago
6.4.0
1 year ago
6.3.0
1 year ago
6.2.1
2 years ago
6.1.0
2 years ago
6.0.1
2 years ago
6.0.0
2 years ago
6.2.0
2 years ago
6.1.1
2 years ago
5.2.1
2 years ago
5.2.0
2 years ago
5.1.0
2 years ago
5.0.1
3 years ago
5.0.0
3 years ago
4.5.0
4 years ago
4.5.1
4 years ago
4.3.0
4 years ago
4.2.0
4 years ago
4.1.0
4 years ago
4.0.0
5 years ago
3.0.0
5 years ago
2.1.0
5 years ago
2.0.1
6 years ago
2.0.0
6 years ago
1.1.0
6 years ago
1.0.0
6 years ago