Skip to content

Commit

Permalink
feat: ESLint migration and lot of fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas.nisolle-ext committed Feb 4, 2022
1 parent 17911af commit e4676c3
Show file tree
Hide file tree
Showing 47 changed files with 2,249 additions and 531 deletions.
97 changes: 97 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
{
"root": true,
"ignorePatterns": [
"projects/**/*"
],
"plugins": [
"unused-imports"
],
"rules": {
"no-unused-vars": "off",
"unused-imports/no-unused-imports": "error",
"unused-imports/no-unused-vars": [
"error",
{ "vars": "all", "varsIgnorePattern": "^_", "args": "after-used", "argsIgnorePattern": "^_" }
],
"prefer-const": "error"
},
"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",
{
"type": "element",
"prefix": "app",
"style": "kebab-case"
}
],
"@angular-eslint/directive-selector": [
"error",
{
"type": "attribute",
"prefix": "app",
"style": "camelCase"
}
],
"quotes": ["error", "single", { "allowTemplateLiterals": true } ],
"semi": ["error", "always"],
"@typescript-eslint/explicit-member-accessibility": [
"error",
{
"accessibility": "explicit",
"overrides": {
"accessors": "explicit",
"constructors": "explicit"
}
}
],
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/no-inferrable-types": "off",
"arrow-parens": [
"off",
"always"
],
"id-blacklist": "error",
"import/order": "off",
"max-len": [
"error",
{
"code": 200
}
],
"padding-line-between-statements": [
"error",
{
"blankLine": "always",
"prev": "*",
"next": "return"
}
]
}
},
{
"files": [
"*.html"
],
"extends": [
"plugin:@angular-eslint/template/recommended"
],
"rules": {}
}
]
}
16 changes: 8 additions & 8 deletions .run/lint.run.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="lint" type="js.build_tools.npm">
<package-json value="$PROJECT_DIR$/package.json"/>
<command value="run"/>
<configuration default="false" name="lint:all" type="js.build_tools.npm">
<package-json value="$PROJECT_DIR$/package.json" />
<command value="run" />
<scripts>
<script value="lint"/>
<script value="lint:all" />
</scripts>
<node-interpreter value="project"/>
<envs/>
<method v="2"/>
<node-interpreter value="project" />
<envs />
<method v="2" />
</configuration>
</component>
</component>
41 changes: 40 additions & 1 deletion angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,15 @@
"/projects/*/src/testing/**.*"
]
}
},
"lint": {
"builder": "@angular-eslint/builder:lint",
"options": {
"lintFilePatterns": [
"projects/ngx-repository/**/*.ts",
"projects/ngx-repository/**/*.html"
]
}
}
}
},
Expand Down Expand Up @@ -134,6 +143,15 @@
"devServerTarget": "ngx-repository-app:serve:production"
}
}
},
"lint": {
"builder": "@angular-eslint/builder:lint",
"options": {
"lintFilePatterns": [
"projects/ngx-repository-app/**/*.ts",
"projects/ngx-repository-app/**/*.html"
]
}
}
}
},
Expand Down Expand Up @@ -162,6 +180,15 @@
"tsConfig": "projects/ngx-http-repository/tsconfig.spec.json",
"karmaConfig": "projects/ngx-http-repository/karma.conf.js"
}
},
"lint": {
"builder": "@angular-eslint/builder:lint",
"options": {
"lintFilePatterns": [
"projects/ngx-http-repository/**/*.ts",
"projects/ngx-http-repository/**/*.html"
]
}
}
}
},
Expand Down Expand Up @@ -196,9 +223,21 @@
}
]
}
},
"lint": {
"builder": "@angular-eslint/builder:lint",
"options": {
"lintFilePatterns": [
"projects/ngx-firestore-repository/**/*.ts",
"projects/ngx-firestore-repository/**/*.html"
]
}
}
}
}
},
"defaultProject": "ngx-repository"
"defaultProject": "ngx-repository",
"cli": {
"defaultCollection": "@angular-eslint/schematics"
}
}

0 comments on commit e4676c3

Please sign in to comment.