Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(tools): add eslint shareable config (#1359)
- Loading branch information
Showing
3 changed files
with
133 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
module.exports = { | ||
plugins: [ | ||
'modules-newline', | ||
'jasmine' | ||
], | ||
extends: [ | ||
'plugin:@angular-eslint/ng-cli-compat', | ||
'plugin:@angular-eslint/ng-cli-compat--formatting-add-on', | ||
'plugin:@angular-eslint/template/process-inline-templates', | ||
'plugin:import/typescript', | ||
'plugin:jasmine/recommended', | ||
], | ||
rules: { | ||
'prefer-arrow/prefer-arrow-functions': [ | ||
'error', | ||
{ | ||
allowStandaloneDeclarations: true | ||
} | ||
], | ||
'@typescript-eslint/naming-convention': [ | ||
'error', | ||
{ | ||
selector: 'enumMember', | ||
format: ['PascalCase', 'UPPER_CASE', 'camelCase'] | ||
} | ||
], | ||
'no-shadow': 'off', | ||
'@typescript-eslint/no-shadow': ['error'], | ||
'@typescript-eslint/member-ordering': 'off', | ||
'import/no-unassigned-import': ['error'], | ||
'modules-newline/import-declaration-newline': 'warn', | ||
'modules-newline/export-declaration-newline': 'warn', | ||
indent: [ | ||
'error', | ||
2, | ||
{ | ||
SwitchCase: 1 | ||
} | ||
], | ||
'object-curly-newline': [ | ||
'error', | ||
{ | ||
ImportDeclaration: {multiline: true, minProperties: 2}, | ||
ExportDeclaration: {multiline: true, minProperties: 2} | ||
} | ||
], | ||
'object-curly-spacing': [ | ||
'error', | ||
'always', | ||
{ | ||
arraysInObjects: false, | ||
objectsInObjects: false | ||
} | ||
], | ||
'no-use-before-define': 'off', | ||
'@typescript-eslint/no-use-before-define': [ | ||
'error', | ||
{ | ||
functions: false | ||
} | ||
], | ||
'@angular-eslint/component-class-suffix': [ | ||
'error', | ||
{ | ||
suffixes: [ | ||
'Component' | ||
] | ||
} | ||
], | ||
'@typescript-eslint/consistent-type-assertions': [ | ||
'error', | ||
{ | ||
assertionStyle: 'angle-bracket' | ||
} | ||
], | ||
'@typescript-eslint/consistent-type-definitions': [ 'error', 'interface'], | ||
'@typescript-eslint/dot-notation': 'off', | ||
'@typescript-eslint/explicit-member-accessibility': [ | ||
'off', | ||
{ | ||
accessibility: 'explicit' | ||
} | ||
], | ||
'brace-style': [ | ||
'error', | ||
'1tbs' | ||
], | ||
'no-trailing-spaces': 'error', | ||
'comma-dangle': [ | ||
'error', | ||
'always-multiline' | ||
], | ||
'id-blacklist': 'off', | ||
'id-match': 'off', | ||
'no-underscore-dangle': 'off', | ||
'max-len': 'off', | ||
'jasmine/no-suite-dupes': ['warn', 'branch'], | ||
'jasmine/no-spec-dupes': ['warn', 'branch'], | ||
'jasmine/new-line-before-expect': 'off', | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"name": "@daffodil/eslint-config", | ||
"version": "0.0.1", | ||
"description": "Eslint shareable config for Angular projects using the Daffodil team's in-house style.", | ||
"main": "./index.js", | ||
"peerDependencies": { | ||
"@angular-eslint/eslint-plugin": "1.1.0", | ||
"@angular-eslint/template-parser": "1.1.0", | ||
"@typescript-eslint/eslint-plugin": "4.3.0", | ||
"@typescript-eslint/parser": "4.3.0", | ||
"eslint": "^7.6.0", | ||
"eslint-plugin-import": "^2.22.1", | ||
"eslint-plugin-jasmine": "^4.1.2", | ||
"eslint-plugin-jsdoc": "^30.7.6", | ||
"eslint-plugin-modules-newline": "^0.0.6", | ||
"eslint-plugin-prefer-arrow": "^1.2.2" | ||
}, | ||
"keywords": [ | ||
"code checker", | ||
"code linter", | ||
"code standards", | ||
"code style", | ||
"eslint", | ||
"eslintconfig", | ||
"hint", | ||
"lint", | ||
"style", | ||
"style checker", | ||
"style linter" | ||
] | ||
} |