Skip to content

Commit

Permalink
Migrate TSlint to ESLint
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasderoche committed Jan 30, 2021
1 parent 9248e1d commit 5139d13
Show file tree
Hide file tree
Showing 28 changed files with 1,784 additions and 231 deletions.
143 changes: 143 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
{
"root": true,
"ignorePatterns": [
"projects/**/*"
],
"overrides": [
{
"files": [
"*.ts"
],
"parserOptions": {
"project": [
"tsconfig.json"
],
"createDefaultProgram": true
},
"extends": [
"plugin:@angular-eslint/ng-cli-compat",
"plugin:@angular-eslint/ng-cli-compat--formatting-add-on",
"plugin:@angular-eslint/template/process-inline-templates"
],
"rules": {
"@angular-eslint/component-selector": [
"off",
{
"type": "",
"prefix": "kebab-case"
}
],
"@angular-eslint/directive-selector": [
"off",
{
"type": "",
"prefix": "camelCase"
}
],
"@typescript-eslint/array-type": [
"error",
{
"default": "array"
}
],
"@typescript-eslint/dot-notation": "off",
"@typescript-eslint/explicit-member-accessibility": [
"error",
{
"accessibility": "no-public"
}
],
"@typescript-eslint/member-delimiter-style": [
"error",
{
"multiline": {
"delimiter": "semi",
"requireLast": true
},
"singleline": {
"delimiter": "semi",
"requireLast": true
}
}
],
"@typescript-eslint/no-inferrable-types": "error",
"@typescript-eslint/semi": [
"error"
],
"brace-style": [
"error",
"1tbs"
],
"max-len": [
"error",
{
"code": 140,
"ignoreTemplateLiterals": true,
"ignoreRegExpLiterals": true
}
],
"comma-dangle": "error",
"no-underscore-dangle": "off",
"no-duplicate-imports": "error",
"no-irregular-whitespace": "error",
"no-multiple-empty-lines": [
"error",
{
"max": 1
}
],
"import/order": [
"error",
{
"groups": [
"external",
"builtin",
"parent",
"sibling",
"internal",
"index",
"object"
],
"pathGroups": [
{
"pattern": "@angular/**",
"group": "external",
"position": "before"
},
{
"pattern": "app/**",
"group": "sibling",
"position": "before"
}
],
"pathGroupsExcludedImportTypes": [
"builtin"
],
"newlines-between": "always",
"alphabetize": {
"order": "asc",
"caseInsensitive": true
}
}
],
"no-redeclare": "error",
"space-before-function-paren": [
"error",
{
"named": "never",
"anonymous": "always"
}
]
}
},
{
"files": [
"*.html"
],
"extends": [
"plugin:@angular-eslint/template/recommended"
],
"rules": {}
}
]
}
1 change: 0 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ Wrapper for TIBCO Spotfire(R) Changelog
* Upgrade to Angular 11.1.1



<a name="0.13.0"></a>
## [0.13.0] (2020-10-16)

Expand Down
30 changes: 12 additions & 18 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,11 @@
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"builder": "@angular-eslint/builder:lint",
"options": {
"tsConfig": [
"src/tsconfig.app.json",
"src/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
"lintFilePatterns": [
"src/**/*.ts",
"src/**/*.html"
]
}
}
Expand Down Expand Up @@ -207,13 +204,13 @@
"options": {
"tsConfig": "projects/spotfire-wrapper/tsconfig.lib.json",
"project": "projects/spotfire-wrapper/ng-package.json"
}
, "configurations": {
},
"configurations": {
"production": {
"tsConfig": "projects/spotfire-wrapper/tsconfig.lib.prod.json"
}
}
},
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
Expand All @@ -223,14 +220,11 @@
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"builder": "@angular-eslint/builder:lint",
"options": {
"tsConfig": [
"projects/spotfire-wrapper/tsconfig.lib.json",
"projects/spotfire-wrapper/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
"lintFilePatterns": [
"projects/spotfire-wrapper/**/*.ts",
"projects/spotfire-wrapper/**/*.html"
]
}
}
Expand All @@ -244,4 +238,4 @@
"style": "scss"
}
}
}
}
3 changes: 3 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ cp -v projects/spotfire-wrapper/CHANGELOG.md CHANGELOG.md
title "Install dependencies:"
npm install

title "Lint code:"
ng lint

title "[spotfire-wrapper] Build the NPM package:"
./node_modules/.bin/ng build spotfire-wrapper --prod
(cd projects/spotfire-wrapper/ ; npm run build --prod )
Expand Down
2 changes: 1 addition & 1 deletion demo1/tsconfig.app.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../tsconfig.base.json",
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/app",
"types": []
Expand Down
2 changes: 1 addition & 1 deletion demo2/tsconfig.app.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../tsconfig.base.json",
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/app",
"types": []
Expand Down
2 changes: 1 addition & 1 deletion demo3/tsconfig.app.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../tsconfig.base.json",
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/app",
"types": []
Expand Down
4 changes: 2 additions & 2 deletions dist/spotfire-wrapper.js

Large diffs are not rendered by default.

Loading

0 comments on commit 5139d13

Please sign in to comment.