eslint-config-bejamas package requires eslint
, eslint-plugin-import
, eslint-plugin-react
, eslint-plugin-react-hooks
, eslint-plugin-jsx-a11y
, eslint-plugin-prettier
, eslint-config-prettier
, @typescript-eslint/parser
and @typescript-eslint/eslint-plugin
.
-
Install correct version of each package:
npx install-peerdeps --dev eslint-config-bejamas
-
Add
"extends": "bejamas"
to your.eslintrc
{
"parser": "@babel/eslint-parser",
"extends": ["bejamas", "plugin:cypress/recommended"],
"settings": {
"import/resolver": {
"alias": {
"map": [
["@", "./src"]
]
},
"node": {
"extensions": [".js", ".jsx"]
}
}
},
"parserOptions": {
"requireConfigFile": false
}
}
{
"extends": ["bejamas", "plugin:cypress/recommended"],
"rules": {
"react/react-in-jsx-scope": "off",
"import/no-unresolved": "off",
"import/order": [
"error",
{
"groups": ["builtin", "external", "internal", "parent", "sibling", "index"],
"pathGroups": [
{
"pattern": "@/**",
"group": "internal",
"position": "before"
}
]
}
]
},
"settings": {
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"]
},
"import/resolver": {
"typescript": {
"alwaysTryTypes": true
}
}
}
}