Skip to content

Commit

Permalink
replace tslint with eslint (#540)
Browse files Browse the repository at this point in the history
* replace tslint with eslint
  • Loading branch information
Hypercubed committed Jul 13, 2021
1 parent 9db7646 commit b1ec106
Show file tree
Hide file tree
Showing 254 changed files with 2,554 additions and 649 deletions.
62 changes: 62 additions & 0 deletions .eslintrc.js
@@ -0,0 +1,62 @@

module.exports = {
'root': true,

ignorePatterns: [
'projects/**/*',
'dist/**/*',
'cypress/**/*'
],

extends: [
'@swimlane',
'prettier'
],

rules: {
},

overrides: [
{
files: [
'*.ts'
],
parser: '@typescript-eslint/parser',
parserOptions: {
project: [
'tsconfig.json'
],
createDefaultProgram: true
},
extends: [
'@swimlane/eslint-config/typescript',
'plugin:@angular-eslint/recommended',
'plugin:@angular-eslint/template/process-inline-templates',
'prettier'
],
rules: {
// off for demo packages
'no-console': 'off',

// fix these in this repo, off for now
'guard-for-in': 'off',
'@angular-eslint/no-host-metadata-property': 'off',
'@angular-eslint/no-output-native': 'off',
'@angular-eslint/component-class-suffix': 'off',
'@angular-eslint/directive-class-suffix': 'off',
'@angular-eslint/no-output-on-prefix': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'off',
}
},
{
'files': [
'*.html'
],
'extends': [
'plugin:@angular-eslint/template/recommended'
],
'rules': {}
}
]
};
25 changes: 10 additions & 15 deletions angular.json
Expand Up @@ -118,14 +118,12 @@
}
},
"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",
"cypress/**/*.js"
]
}
}
Expand Down Expand Up @@ -177,14 +175,11 @@
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"builder": "@angular-eslint/builder:lint",
"options": {
"tsConfig": [
"projects/swimlane/ngx-ui/tsconfig.lib.json",
"projects/swimlane/ngx-ui/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
"lintFilePatterns": [
"projects/swimlane/ngx-ui/**/*.ts",
"projects/swimlane/ngx-ui/**/*.html"
]
}
}
Expand All @@ -195,4 +190,4 @@
"cli": {
"analytics": false
}
}
}
14 changes: 14 additions & 0 deletions cypress/.eslintrc.json
@@ -0,0 +1,14 @@
{
"ignorePatterns": ["!**/*"],
"plugins": [
"cypress",
"no-only-tests"
],
"extends": [
"../.eslintrc.js",
"plugin:cypress/recommended"
],
"rules": {
"no-only-tests/no-only-tests": "error"
}
}
2 changes: 1 addition & 1 deletion cypress/plugins/index.js
Expand Up @@ -11,7 +11,7 @@
// This function is called when a project is opened or re-opened (e.g. due to
// the project's config changing)

module.exports = (on, config) => {
module.exports = (_on, _config) => {
// `on` is used to hook into various events Cypress emits
// `config` is the resolved Cypress config
};
2 changes: 1 addition & 1 deletion cypress/support/index.d.ts
@@ -1,4 +1,4 @@
// tslint:disable-next-line:no-namespace
/* eslint-disable @typescript-eslint/no-unused-vars */
declare namespace Cypress {
interface Chainable<T = unknown> {
/**
Expand Down

0 comments on commit b1ec106

Please sign in to comment.