add linting to tests step scriptspackage.json section
bash
"test": "npm run eslint && ..."
create .eslintrc.json near to you package.json with the following content
json
{
"extends": "./node_modules/eslint-config-valorsoft/.eslintrc.json",
"env": {
"node": true
}
}
run npm t to check that all is working correctly
What is disabled
no-eq-null - duplicates eqeqeq:smart
no-restricted-imports, no-restricted-modules, no-restricted-globals - dependant on project requirements
id-match - not found any particular use of this rule, camelCase is enough
jsx-quotes - I don't use jsx so I don't care
no-plusplus - why not ++? It's nice to use when you know what you are doing
no-restricted-syntax - duplicates no-with and disabled functional expressions
no-ternary - why not? but not nested ternary please
require-jsdoc- nice thing, but hard to follow
spaced-comment - nice for meaningful comments, bad for quick code commenting
wrap-regex - no need
prefer-reflect - compatibility is to low to use
newline-before-return - TBD
What is tweaked
indent - 2 spaces rulezzz!
max-len - extended to 120 chars
newline-per-chained-call - extended ignoreChainWithDepth to 3
The Tidelift Subscription provides access to a continuously curated stream of human-researched and maintainer-verified data on open source packages and their licenses, releases, vulnerabilities, and development practices.