WEB-51 fix: migrate from .eslintrc.json to eslint.config.js due to Eslint 9.22 deprecation (#2326)

* WEB-51 fix: migrate from .eslintrc.json to eslint.config.js due to ESLint 9.22 deprecation

* update package.json
This commit is contained in:
Gopi Kishan
2025-03-16 14:47:41 -06:00
committed by GitHub
parent 83e9f094c1
commit 9d2c42d55b
4 changed files with 4474 additions and 5509 deletions
-51
View File
@@ -1,51 +0,0 @@
{
"root": true,
"ignorePatterns": [
"projects/**/*"
],
"overrides": [
{
"files": [
"*.ts"
],
"parserOptions": {
"project": [
"tsconfig.json",
"e2e/tsconfig.json"
],
"createDefaultProgram": true
},
"extends": [
"plugin:@angular-eslint/recommended",
"plugin:@angular-eslint/template/process-inline-templates"
],
"rules": {
"@angular-eslint/component-selector": [
"error",
{
"prefix": "mifosx",
"style": "kebab-case",
"type": "element"
}
],
"@angular-eslint/directive-selector": [
"error",
{
"prefix": "mifosx",
"style": "camelCase",
"type": "attribute"
}
]
}
},
{
"files": [
"*.html"
],
"extends": [
"plugin:@angular-eslint/template/recommended"
],
"rules": {}
}
]
}
+73
View File
@@ -0,0 +1,73 @@
// eslint.config.js
const angularEslintPlugin = require('@angular-eslint/eslint-plugin');
const angularEslintTemplatePlugin = require('@angular-eslint/eslint-plugin-template');
const angularTemplateParser = require('@angular-eslint/template-parser');
const tseslint = require('@typescript-eslint/eslint-plugin');
const tsParser = require('@typescript-eslint/parser');
module.exports = [
{
ignores: ['projects/**/*']
},
// TS files configuration
{
files: ['**/*.ts'],
languageOptions: {
parser: tsParser,
parserOptions: {
project: [
'tsconfig.json',
'e2e/tsconfig.json'
],
createDefaultProgram: true
}
},
plugins: {
'@angular-eslint': angularEslintPlugin,
'@angular-eslint/template': angularEslintTemplatePlugin,
'@typescript-eslint': tseslint
},
rules: {
// Angular recommended rules
...angularEslintPlugin.configs.recommended.rules,
// Angular template inline rules
...angularEslintTemplatePlugin.configs['process-inline-templates'].rules,
// Component selector rules
'@angular-eslint/component-selector': [
'error',
{
prefix: 'mifosx',
style: 'kebab-case',
type: 'element'
}
],
'@angular-eslint/directive-selector': [
'error',
{
prefix: 'mifosx',
style: 'camelCase',
type: 'attribute'
}
]
}
},
// HTML files configuration
{
files: ['**/*.html'],
languageOptions: {
parser: angularTemplateParser
},
plugins: {
'@angular-eslint': angularEslintPlugin,
'@angular-eslint/template': angularEslintTemplatePlugin
},
rules: {
// Angular template recommended rules
...angularEslintTemplatePlugin.configs.recommended.rules
}
}
];
+4391 -5448
View File
File diff suppressed because it is too large Load Diff
+10 -10
View File
@@ -71,11 +71,11 @@
},
"devDependencies": {
"@angular-devkit/build-angular": "14.2.12",
"@angular-eslint/builder": "14.4.0",
"@angular-eslint/eslint-plugin": "14.4.0",
"@angular-eslint/eslint-plugin-template": "14.4.0",
"@angular-eslint/builder": "^19.2.1",
"@angular-eslint/eslint-plugin": "^19.2.1",
"@angular-eslint/eslint-plugin-template": "^19.2.1",
"@angular-eslint/schematics": "14.4.0",
"@angular-eslint/template-parser": "14.4.0",
"@angular-eslint/template-parser": "^19.2.1",
"@angular/cli": "14.2.12",
"@angular/compiler-cli": "14.3.0",
"@angular/language-service": "14.3.0",
@@ -91,10 +91,10 @@
"@types/lodash": "4.14.132",
"@types/node": "12.11.1",
"@types/vkbeautify": "^0.99.2",
"@typescript-eslint/eslint-plugin": "5.43.0",
"@typescript-eslint/parser": "5.43.0",
"@typescript-eslint/eslint-plugin": "^8.26.1",
"@typescript-eslint/parser": "^8.26.1",
"cypress": "^13.17.0",
"eslint": "^8.28.0",
"eslint": "^9.22.0",
"git-describe": "^4.1.1",
"htmlhint": "1.1.4",
"https-proxy-agent": "2.2.1",
@@ -113,18 +113,18 @@
"prettier": "^3.3.3",
"prettier-plugin-multiline-arrays": "^3.0.6",
"protractor": "~7.0.0",
"puppeteer": "^24.1.0",
"puppeteer": "^24.4.0",
"stylelint": "^16.10.0",
"stylelint-config-recommended-scss": "^14.1.0",
"stylelint-config-standard": "^36.0.1",
"stylelint-scss": "^6.8.1",
"tailwindcss": "^3.3.3",
"ts-node": "8.2.0",
"typescript": "4.6.4"
"typescript": "^4.6.4"
},
"repository": {
"type": "git",
"url": "https://github.com/openMF/web-app.git"
"url": "git+https://github.com/openMF/web-app.git"
},
"bugs": {
"url": "https://github.com/openMF/web-app/issues"