Skip to content

Commit

Permalink
ci: essential linting
Browse files Browse the repository at this point in the history
  • Loading branch information
ScarletFlash committed Jun 22, 2024
1 parent 19690e2 commit de5a06f
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 421 deletions.
2 changes: 2 additions & 0 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@
"lint": {
"builder": "@angular-eslint/builder:lint",
"options": {
"quiet": true,
"eslintConfig": "eslint.config.js",
"lintFilePatterns": ["src/**/*.ts", "src/**/*.html"]
}
}
Expand Down
51 changes: 22 additions & 29 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,40 +1,33 @@
// @ts-check
const eslint = require('@eslint/js');
const tseslint = require('typescript-eslint');
const angular = require('angular-eslint');
const ESLint = require('@eslint/js');
const AngularESLint = require('angular-eslint');
const TypeScriptESLint = require('typescript-eslint');

module.exports = tseslint.config(
module.exports = TypeScriptESLint.config(
{
languageOptions: {
parser: TypeScriptESLint.parser,
parserOptions: {
ecmaFeatures: { modules: true },
ecmaVersion: 'latest',
project: './tsconfig.app.json'
}
},
files: ['**/*.ts'],
extends: [
eslint.configs.recommended,
...tseslint.configs.recommended,
...tseslint.configs.stylistic,
...angular.configs.tsRecommended
ESLint.configs.recommended,
...TypeScriptESLint.configs.strictTypeChecked,
...TypeScriptESLint.configs.stylisticTypeChecked,
...AngularESLint.configs.tsAll
],
processor: angular.processInlineTemplates,
rules: {
'@angular-eslint/directive-selector': [
'error',
{
type: 'attribute',
prefix: 'app',
style: 'camelCase'
}
],
'@angular-eslint/component-selector': [
'error',
{
type: 'element',
prefix: 'app',
style: 'kebab-case'
}
]
}
processor: AngularESLint.processInlineTemplates,
rules: {}
},
{
files: ['**/*.html'],
extends: [...angular.configs.templateRecommended, ...angular.configs.templateAccessibility],
rules: {}
extends: [...AngularESLint.configs.templateAll],
rules: {
'@angular-eslint/template/i18n': 'off'
}
}
);
Loading

0 comments on commit de5a06f

Please sign in to comment.