@belikesoftware/fe-rules
v1.9.14
Published
ESLint configuration preset
Downloads
6
Readme
Belike ESLint Config
This is an opionated configuration preset for ESLint, tailored for Belike JavaScript/TypeScript projects.
Setting up
- Install:
$ npm i --save-dev @belikesoftware/fe-rules
# Install peer dependencies
$ npx install-peerdeps --dev @belikesoftware/fe-rules- Add the following to
package.json:
{
"eslintConfig": {
"extends": [
"./node_modules/@belikesoftware/fe-rules"
]
}
}Or, touch .eslintrc file and add:
{
"extends": [
"./node_modules/@belikesoftware/fe-rules"
]
}Troubleshooting
Depending on how ESLint is installed (locally or globally) we may come across this issue:
ESLint could not find the config "@belikesoftware/fe-rules" to extend from. Please check that the name of the config is correct.This happens because our global installed ESLint can't access to a config installed from a peer dependency, or a config which is not locally set. In order to fix this we have to add --resolve-plugins-relative-to as option to the ESLint script on our package.json, for instance:
eslint --fix --resolve-plugins-relative-to 'src/**/*.{ts,tsx}'