Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
18 changes: 18 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Ignorar configuración propia
angular.json
karma.conf.js
tsconfig*.json
package*.json
webpack.config.js

# Ignorar archivos de build y dependencias
dist/
node_modules/
coverage/

# Ignorar entornos específicos
projects/portal/
src/environments/
tmp/
temp/
*.log
175 changes: 100 additions & 75 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,63 +11,32 @@ https://github.com/typescript-eslint/tslint-to-eslint-config/blob/master/docs/FA

Happy linting! 💖
*/

module.exports = {
'env': {
'browser': true,
'es6': true,
'node': true
},
'parser': '@typescript-eslint/parser',
'parserOptions': {
'project': 'tsconfig.json',
'sourceType': 'module'
root: true,
ignorePatterns: ['projects/**/*'],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2022,
sourceType: 'module',
project: ['./tsconfig.json']
},
'plugins': [
'@angular-eslint/eslint-plugin',
'@typescript-eslint'
plugins: [
'@typescript-eslint',
'@angular-eslint',
'@stylistic'
],
'rules': {
'@angular-eslint/component-class-suffix': 'error',
'@angular-eslint/component-selector': [
'off',
{
'type': 'element',
'prefix': [
'app',
'mpi'
],
'style': 'kebab-case'
}
],
'@angular-eslint/directive-class-suffix': 'error',
'@angular-eslint/directive-selector': [
'off',
{
'type': 'attribute',
'prefix': [
'app',
'mpi',
'tm'
],
'style': 'camelCase'
}
],
'@angular-eslint/no-host-metadata-property': 'error',
'@angular-eslint/no-inputs-metadata-property': 'error',
'@angular-eslint/no-output-rename': 'error',
'@angular-eslint/no-outputs-metadata-property': 'error',
'@angular-eslint/use-lifecycle-interface': 'error',
'@angular-eslint/use-pipe-transform-interface': 'error',
'@typescript-eslint/consistent-type-definitions': 'error',
'@typescript-eslint/dot-notation': 'off',
'@typescript-eslint/explicit-member-accessibility': [
'off',
{
'accessibility': 'explicit'
}
],
'keyword-spacing': ['error', { 'after': true, 'before': true }],
'space-before-blocks': ['error', { 'functions': 'always', 'keywords': 'always', 'classes': 'always' }],
extends: [
"eslint:recommended",
'plugin:@typescript-eslint/recommended',
'plugin:@angular-eslint/recommended',
'plugin:@stylistic/recommended'
],


rules: {
// TypeScript rules
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/indent': [
'error',
4,
Expand All @@ -83,19 +52,6 @@ module.exports = {
'ArrayExpression': 'first'
}
],
'@typescript-eslint/member-delimiter-style': [
'error',
{
'multiline': {
'delimiter': 'semi',
'requireLast': true
},
'singleline': {
'delimiter': 'semi',
'requireLast': false
}
}
],
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-empty-interface': 'error',
'@typescript-eslint/no-inferrable-types': [
Expand All @@ -105,16 +61,67 @@ module.exports = {
}
],
'@typescript-eslint/prefer-function-type': 'error',
'@typescript-eslint/quotes': [
'@typescript-eslint/unified-signatures': 'error',

// Stylistic rules
'@stylistic/member-delimiter-style': [
'error',
'single'
{
multiline: { delimiter: 'semi', requireLast: true },
singleline: { delimiter: 'semi', requireLast: false },
},
],
'@typescript-eslint/semi': [
'error',
'always'
'@stylistic/semi': ['error', 'always'],
'@stylistic/quotes': ['error', 'single'],
'@stylistic/type-annotation-spacing': 'error',

// Angular-specific rules
'@angular-eslint/component-class-suffix': ['error', { suffixes: ['Component'] }],
'@angular-eslint/directive-class-suffix': ['error', { suffixes: ['Directive'] }],
'@angular-eslint/no-host-metadata-property': 'error',
'@angular-eslint/no-inputs-metadata-property': 'error',
'@angular-eslint/no-outputs-metadata-property': 'error',
'@angular-eslint/use-lifecycle-interface': 'warn',
'@angular-eslint/use-pipe-transform-interface': 'warn',
'@angular-eslint/no-outputs-metadata-property': 'error',


'@typescript-eslint/consistent-type-definitions': 'error',
'@typescript-eslint/dot-notation': 'off',
'@typescript-eslint/explicit-member-accessibility': [
'off',
{
'accessibility': 'explicit'
}
],
'@typescript-eslint/type-annotation-spacing': 'error',
'@typescript-eslint/unified-signatures': 'error',
'@angular-eslint/component-selector': [
'off',
{
'type': 'element',
'prefix': [
'app',
'mpi'
],
'style': 'kebab-case'
}
],
'@angular-eslint/directive-selector': [
'off',
{
'type': 'attribute',
'prefix': [
'app',
'mpi',
'tm'
],
'style': 'camelCase'
}
],

// JS/TS base rules
"indent": "off",
'keyword-spacing': ['error', { 'after': true, 'before': true }],
'space-before-blocks': ['error', { 'functions': 'always', 'keywords': 'always', 'classes': 'always' }],
'brace-style': [
'error',
'1tbs',
Expand Down Expand Up @@ -224,5 +231,23 @@ module.exports = {
],
'no-irregular-whitespace': ['error', { 'skipComments': true }],
'no-multi-spaces': 'error'
}
},
overrides: [
// Templates
{
files: ['*.html'],
parser: '@angular-eslint/template-parser',
plugins: ['@angular-eslint/template'],
extends: ['plugin:@angular-eslint/template/recommended'],
rules: {
// Template rules
'@angular-eslint/template/no-negated-async': 'error',
},
},
// Component inline templates
{
files: ['*.component.ts'],
extends: ['plugin:@angular-eslint/template/process-inline-templates'],
},
],
};
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
.settings/

# misc
/.angular/cache
/.sass-cache
/connect.lock
/coverage/*
Expand Down
Loading
Loading