Eslint config for jsx.
-
npm
npm install --save-dev @guanghechen/eslint-config-jsx
-
yarn
yarn add --dev @guanghechen/eslint-config-jsx
-
Use in .eslintrc.js
{ extends: ['@guanghechen/jsx'], }
See .eslintrc
{
"root": true,
"extends": [
"@guanghechen",
"@guanghechen/jsx",
"plugin:jest/recommended",
"prettier"
],
"plugins": ["import", "jest", "prettier"],
"env": {
"browser": true,
"commonjs": true,
"es6": true,
"jest": true,
"node": true
},
"rules": {
"import/no-internal-modules": [
2,
{
"allow": ["util"]
}
]
},
"overrides": [
{
"files": ["**/*.ts", "**/*tsx"],
"extends": [
"@guanghechen/jsx",
"@guanghechen/ts",
"plugin:jest/recommended"
]
}
]
}