@halfserious/eslint-config-core
v1.3.1
Published
Half Serious ESLint Core Configuration
Downloads
127
Keywords
Readme
Half Serious Linter
Installation
npm install --save-dev @halfserious/eslint-config-core eslint-plugin-import eslint-plugin-node eslint-plugin-promise
Usage
Lambda
touch .eslintrc.json
.eslintrc.js
module.exports = {
root: true,
extends: ['@halfserious/eslint-config-core/lambda']
}
Each lambda also requires an .eslintrc.js
and the content must be : module.exports = {}
You can customize the rules per project by adding :
module.exports = {
root: true,
extends: ["@halfserious/eslint-config-core/lambda"],
rules: {
"semi":"warn"
}
}
Angular
Dependencies
npm install --save-dev @angular-eslint/builder \
@angular-eslint/eslint-plugin \
@angular-eslint/eslint-plugin-template \
@angular-eslint/schematics \
@angular-eslint/template-parser \
@typescript-eslint/eslint-plugin \
@typescript-eslint/parser \
eslint
touch .eslintrc.json
.eslintrc.js
module.exports = {
root: true,
extends: ['@halfserious/eslint-config-core/angular'],
parserOptions: {
project: ['tsconfig.json'],
tsconfigRootDir: __dirname
}
}
You can customize the rules per project by adding :
module.exports = {
root: true,
extends: ["@halfserious/eslint-config-core/angular"],
rules: {
"semi":"warn"
}
}
{
"compileOnSave": false,
"compilerOptions": {
"baseUrl": "./",
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"downlevelIteration": true,
"experimentalDecorators": true,
"module": "esnext",
"moduleResolution": "node",
"importHelpers": true,
"target": "es2015",
"removeComments": true, /* Do not emit comments to output. */
// "noUnusedLocals": true, /* Report errors on unused locals. */
// "noUnusedParameters": true, /* Report errors on unused parameters. */
"strictFunctionTypes": true, /* Enable strict checking of function types. */
// "strictNullChecks": true, /* Enable strict null checks. */
"noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
"noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
"typeRoots": [
"node_modules/@types"
],
"lib": [
"es2018",
"dom"
]
},
"angularCompilerOptions": {
"fullTemplateTypeCheck": true,
"strictInjectionParameters": true
}
}
Contribution
Don't hesitate to open a PR with the reason(s) to update the rule(s) in the core set.