Skip to content

Commit

Permalink
Fixed primefaces#12577 - Migrate to eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
cetincakiroglu committed Jan 30, 2023
1 parent 7ac8311 commit 202737a
Show file tree
Hide file tree
Showing 7 changed files with 78 additions and 191 deletions.
51 changes: 51 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"root": true,
"ignorePatterns": ["projects/**/*"],
"overrides": [
{
"files": ["*.ts"],
"parserOptions": {
"project": ["tsconfig.json", "e2e/tsconfig.json"],
"createDefaultProgram": true
},
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended", "plugin:@angular-eslint/recommended", "plugin:@angular-eslint/template/process-inline-templates", "prettier"],
"rules": {
"@angular-eslint/component-selector": [
"error",
{
"type": "element",
"prefix": "p",
"style": "kebab-case"
}
],
"@angular-eslint/directive-selector": [
"error",
{
"type": "attribute",
"prefix": "p",
"style": "camelCase"
}
],
"arrow-body-style": ["error", "as-needed"],
"curly": "error",
"@typescript-eslint/member-ordering": [
"error",
{
"default": ["public-static-field", "static-field", "instance-field", "public-instance-method", "public-static-field"]
}
],
"no-console": [
"error",
{
"allow": ["debug", "info", "time", "timeEnd", "trace"]
}
]
}
},
{
"files": ["*.html"],
"extends": ["plugin:@angular-eslint/template/recommended"],
"rules": {}
}
]
}
2 changes: 1 addition & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ CHANGELOG.md
.angular-cli.json
angular.json
tsconfig*.json
tslint.json
.eslintrc.json
gulpfile.js
.github
package-lock.json
Expand Down
26 changes: 13 additions & 13 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
"root": "src",
"projectType": "library",
"architect": {
"build": {
"build": {
"builder": "@angular-devkit/build-angular:ng-packagr",
"options": {
"project": "src/app/components/ng-package.json",
"tsConfig": "src/app/components/tsconfig.lib.prod.json"
"project": "src/app/components/ng-package.json",
"tsConfig": "src/app/components/tsconfig.lib.prod.json"
}
}
}
Expand Down Expand Up @@ -62,7 +62,7 @@
"file-saver",
"jspdf",
"quill"
]
]
},
"configurations": {
"production": {
Expand Down Expand Up @@ -143,14 +143,11 @@
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"builder": "@angular-eslint/builder:lint",
"options": {
"tsConfig": [
"tsconfig.app.json",
"tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
"lintFilePatterns": [
"src/**/*.ts",
"src/**/*.html"
]
}
}
Expand All @@ -159,6 +156,9 @@
},
"defaultProject": "primeng",
"cli": {
"analytics": false
"analytics": false,
"schematicCollections": [
"@angular-eslint/schematics"
]
}
}
}
18 changes: 11 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@
"@angular/router": "^15.1.0",
"@types/jasmine": "~3.10.0",
"@types/node": "^12.11.1",
"@fullcalendar/core": "6.0.0-beta.1",
"@fullcalendar/daygrid": "6.0.0-beta.1",
"@fullcalendar/interaction": "6.0.0-beta.1",
"@fullcalendar/timegrid": "6.0.0-beta.1",
"@fullcalendar/web-component": "6.0.0-beta.1",
"@fullcalendar/angular": "^6.0.3",
"@fullcalendar/core": "^6.0.3",
"@fullcalendar/daygrid": "^6.0.3",
"@fullcalendar/interaction": "^6.0.3",
"@fullcalendar/timegrid": "^6.0.3",
"chart.js": "3.3.2",
"codelyzer": "^6.0.0",
"del": "^2.2.0",
Expand Down Expand Up @@ -69,9 +69,13 @@
"rxjs": "~7.5.0",
"ts-node": "~8.3.0",
"tslib": "^2.3.0",
"tslint": "~6.1.0",
"typescript": "~4.8.4",
"xlsx": "^0.15.1",
"zone.js": "~0.11.4"
"zone.js": "~0.11.4",
"eslint": "^8.28.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-import": "latest",
"eslint-plugin-jsdoc": "latest",
"eslint-plugin-prefer-arrow": "latest"
}
}
17 changes: 0 additions & 17 deletions src/tslint.json

This file was deleted.

3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"paths": {
"primeng/*": ["src/app/components/*/public_api"]
},
"useDefineForClassFields": false
"useDefineForClassFields": false,
"noFallthroughCasesInSwitch": true
}
}
152 changes: 0 additions & 152 deletions tslint.json

This file was deleted.

0 comments on commit 202737a

Please sign in to comment.