Skip to content

Commit

Permalink
feat: eslint 9 support
Browse files Browse the repository at this point in the history
  • Loading branch information
mpalourdio committed Feb 5, 2025
1 parent e57e441 commit 3c58d4c
Show file tree
Hide file tree
Showing 6 changed files with 403 additions and 1,034 deletions.
68 changes: 0 additions & 68 deletions .eslintrc.json

This file was deleted.

92 changes: 92 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
// @ts-check
const eslint = require('@eslint/js');
const tseslint = require('typescript-eslint');
const angular = require('angular-eslint');
const rxjs = require('@smarttools/eslint-plugin-rxjs');

module.exports = tseslint.config(
{
files: ['**/*.ts'],
extends: [
eslint.configs.recommended,
...tseslint.configs.recommended,
...tseslint.configs.stylistic,
...angular.configs.tsRecommended,
{
languageOptions: {
parserOptions: {
projectService: true,
tsconfigRootDir: __dirname,
},
},
},
],
plugins: {
rxjs,
},
processor: angular.processInlineTemplates,
'rules': {
'@typescript-eslint/explicit-function-return-type': [
'error'
],
'no-extra-boolean-cast': [
'off'
],
'@angular-eslint/component-selector': [
'error',
{
'type': 'element',
'prefix': '',
'style': 'kebab-case'
}
],
'@angular-eslint/directive-selector': [
'error',
{
'type': 'attribute',
'prefix': '',
'style': 'camelCase'
}
],
'comma-dangle': [
'error',
{
'objects': 'never',
'arrays': 'always-multiline',
'functions': 'never'
}
],
'rxjs/finnish': [
'error',
{
'functions': true,
'methods': true,
'names': {
'^(canActivate|canActivateChild|canDeactivate|canLoad|intercept|resolve|validate)$': false
},
'parameters': true,
'properties': true,
'strict': false,
'types': {
'^EventEmitter$': false
},
'variables': true
}
],
'rxjs/no-implicit-any-catch': [
'error',
{
'allowExplicitAny': true
}
]
},
},
{
files: ['**/*.html'],
extends: [
...angular.configs.templateRecommended,
...angular.configs.templateAccessibility,
],
rules: {},
}
);
Loading

0 comments on commit 3c58d4c

Please sign in to comment.