@pondigitalsolutions-npm/eslint-config v0.3.1
Pon Digital Solutions ESLint
This project is an attempt at a simple, reusable, es-linting configuration. It
starts with setting up the basics in index.js
and the intention is to supply
some additional flavours such as react.js
and most likely some typescript
tom-foolery.
Installation
To use, simply
npm i -D @pondigitalsolutions-npm/eslint-config eslint eslint-config-google eslint-plugin-jsdoc
then extend @pondigitalsolutions-npm/eslint-config
in your eslintrc
. For a
less cluttered project-root it is recommended to put the eslint configuration
in your package.json
like so:
{
"name": "linting-test",
"version": "1.0.0",
# Some other common stuff
"eslintConfig": {
"plugins": [
"jsdoc"
],
"extends": [
"plugin:jsdoc/recommended",
"@pondigitalsolutions-npm/eslint-config"
],
"env": {
"browser": true,
"es2020": true
},
"parserOptions": {
"ecmaVersion": 2020
},
"settings": {
"jsdoc": {
"mode": "typescript"
}
}
}
}
React
To use the react-rules, further install npm i -D eslint-plugin-react
and
instead extend @pondigitalsolutions-npm/eslint-config/react
.
Project-specific control
Any of the rules can be further defined in your project as per usual. As an
example using the package.json
configuration outlined above:
{
"eslintConfig": {
"extends": [
"@pondigitalsolutions-npm/eslint-config/react",
"airbnb-base",
],
"rules": {
"space-in-parens": [
"error",
"always"
],
}
}
}