@valian/eslint-config
v1.3.11
Published
Valian ESLint Config
Downloads
1,664
Readme
eslint-config
Sharable eslint config created and used by Valian
eslint plugins and config used
Base configuration
@typescript-eslint/eslint-plugin
eslint-config-airbnb
eslint-config-airbnb-typescript
eslint-config-prettier
eslint-plugin-eslint-comments
eslint-plugin-import
eslint-plugin-jest
eslint-plugin-jest-formatting
eslint-plugin-promise
eslint-plugin-simple-import-sort
eslint-plugin-unicorn
Node Typescript App
React Typescript App
Usage
yarn add -D eslint @valian/eslint-config
or
npm install --save-dev eslint @valian/eslint-config
Node Typescript App Configuration
Add .eslintrc.js
:
module.exports = {
env: {
node: true,
},
extends: ['@valian/eslint-config/node'],
parserOptions: {
tsconfigRootDir: __dirname,
project: ['./tsconfig.json'],
},
}
React Typescript App Configuration
Add .eslintrc.js
:
module.exports = {
env: {
browser: true,
},
extends: ['@valian/eslint-config/react'],
parserOptions: {
tsconfigRootDir: __dirname,
project: ['./tsconfig.json'],
},
settings: {
react: {
version: 'detect',
},
},
}