mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-05-12 17:04:46 +00:00
ESLint fixes and unified lint targets (#3424)
* optimise lint targets * fix eslint config files * fix app coverage settings * tune eslint to warn about optional chains
This commit is contained in:
parent
46ea85436b
commit
9106608398
@ -113,6 +113,7 @@
|
||||
"@angular-eslint/no-outputs-metadata-property": "error",
|
||||
"@angular-eslint/use-lifecycle-interface": "error",
|
||||
"@angular-eslint/use-pipe-transform-interface": "error",
|
||||
"@typescript-eslint/prefer-optional-chain": "warn",
|
||||
"@typescript-eslint/no-misused-new": "error",
|
||||
"@typescript-eslint/no-non-null-assertion": "error",
|
||||
"@typescript-eslint/prefer-function-type": "error",
|
||||
@ -328,7 +329,7 @@
|
||||
"@angular-eslint/template/no-negated-async": "off",
|
||||
"@angular-eslint/template/no-positive-tabindex": "error",
|
||||
"@angular-eslint/template/eqeqeq": "error",
|
||||
"@angular-eslint/template/no-call-expression": "warn"
|
||||
"@angular-eslint/template/no-call-expression": "off"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -1,11 +1,15 @@
|
||||
// Karma configuration file, see link for more information
|
||||
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
||||
const { join } = require('path');
|
||||
const getBaseKarmaConfig = require('../karma.conf');
|
||||
|
||||
module.exports = function (config) {
|
||||
const baseConfig = getBaseKarmaConfig();
|
||||
config.set({
|
||||
...baseConfig,
|
||||
coverageReporter: {},
|
||||
coverageReporter: {
|
||||
...baseConfig.coverageReporter,
|
||||
dir: join(__dirname, '../coverage/content-ce')
|
||||
}
|
||||
});
|
||||
};
|
||||
|
@ -237,19 +237,7 @@
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"executor": "@angular-eslint/builder:lint",
|
||||
"options": {
|
||||
"lintFilePatterns": [
|
||||
"app/**/*.ts",
|
||||
"app/**/*.html"
|
||||
],
|
||||
"cache": true,
|
||||
"cacheLocation": ".eslintcache",
|
||||
"ignorePath": ".eslintignore"
|
||||
},
|
||||
"outputs": [
|
||||
"{options.outputFile}"
|
||||
]
|
||||
"executor": "@angular-eslint/builder:lint"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -18,17 +18,7 @@
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"executor": "@angular-eslint/builder:lint",
|
||||
"options": {
|
||||
"lintFilePatterns": [
|
||||
"e2e/**/*.ts",
|
||||
"e2e/**/*.html"
|
||||
],
|
||||
"cache": true,
|
||||
"cacheLocation": ".eslintcache",
|
||||
"ignorePath": ".eslintignore"
|
||||
},
|
||||
"outputs": ["{options.outputFile}"]
|
||||
"executor": "@angular-eslint/builder:lint"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -18,17 +18,7 @@
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"executor": "@angular-eslint/builder:lint",
|
||||
"options": {
|
||||
"lintFilePatterns": [
|
||||
"e2e/**/*.ts",
|
||||
"e2e/**/*.html"
|
||||
],
|
||||
"cache": true,
|
||||
"cacheLocation": ".eslintcache",
|
||||
"ignorePath": ".eslintignore"
|
||||
},
|
||||
"outputs": ["{options.outputFile}"]
|
||||
"executor": "@angular-eslint/builder:lint"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -18,17 +18,7 @@
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"executor": "@angular-eslint/builder:lint",
|
||||
"options": {
|
||||
"lintFilePatterns": [
|
||||
"e2e/**/*.ts",
|
||||
"e2e/**/*.html"
|
||||
],
|
||||
"cache": true,
|
||||
"cacheLocation": ".eslintcache",
|
||||
"ignorePath": ".eslintignore"
|
||||
},
|
||||
"outputs": ["{options.outputFile}"]
|
||||
"executor": "@angular-eslint/builder:lint"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -18,17 +18,7 @@
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"executor": "@angular-eslint/builder:lint",
|
||||
"options": {
|
||||
"lintFilePatterns": [
|
||||
"e2e/**/*.ts",
|
||||
"e2e/**/*.html"
|
||||
],
|
||||
"cache": true,
|
||||
"cacheLocation": ".eslintcache",
|
||||
"ignorePath": ".eslintignore"
|
||||
},
|
||||
"outputs": ["{options.outputFile}"]
|
||||
"executor": "@angular-eslint/builder:lint"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -18,17 +18,7 @@
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"executor": "@angular-eslint/builder:lint",
|
||||
"options": {
|
||||
"lintFilePatterns": [
|
||||
"e2e/**/*.ts",
|
||||
"e2e/**/*.html"
|
||||
],
|
||||
"cache": true,
|
||||
"cacheLocation": ".eslintcache",
|
||||
"ignorePath": ".eslintignore"
|
||||
},
|
||||
"outputs": ["{options.outputFile}"]
|
||||
"executor": "@angular-eslint/builder:lint"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -17,19 +17,7 @@
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"executor": "@angular-eslint/builder:lint",
|
||||
"options": {
|
||||
"lintFilePatterns": [
|
||||
"e2e/**/*.ts",
|
||||
"e2e/**/*.html"
|
||||
],
|
||||
"cache": true,
|
||||
"cacheLocation": ".eslintcache",
|
||||
"ignorePath": ".eslintignore"
|
||||
},
|
||||
"outputs": [
|
||||
"{options.outputFile}"
|
||||
]
|
||||
"executor": "@angular-eslint/builder:lint"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
15
nx.json
15
nx.json
@ -48,10 +48,17 @@
|
||||
]
|
||||
},
|
||||
"lint": {
|
||||
"inputs": [
|
||||
"default",
|
||||
"{workspaceRoot}/.eslintrc.json"
|
||||
]
|
||||
"executor": "@angular-eslint/builder:lint",
|
||||
"outputs": ["{options.outputFile}"],
|
||||
"options": {
|
||||
"lintFilePatterns": [
|
||||
"{projectRoot}/**/*.ts",
|
||||
"{projectRoot}/**/*.html"
|
||||
],
|
||||
"cache": true,
|
||||
"cacheLocation": ".eslintcache",
|
||||
"ignorePath": ".eslintignore"
|
||||
}
|
||||
},
|
||||
"e2e": {
|
||||
"inputs": [
|
||||
|
@ -1,23 +1,15 @@
|
||||
path = require("path");
|
||||
const path = require('path');
|
||||
module.exports = {
|
||||
"extends": "../../.eslintrc.json",
|
||||
"ignorePatterns": [
|
||||
"!**/*"
|
||||
],
|
||||
"overrides": [
|
||||
extends: '../../.eslintrc.json',
|
||||
ignorePatterns: ['!**/*'],
|
||||
overrides: [
|
||||
{
|
||||
"files": [
|
||||
"*.ts"
|
||||
],
|
||||
"parserOptions": {
|
||||
"project": [
|
||||
path.join(__dirname, "tsconfig.lib.json"),
|
||||
path.join(__dirname, "tsconfig.spec.json")
|
||||
],
|
||||
"createDefaultProgram": true
|
||||
files: ['*.ts'],
|
||||
parserOptions: {
|
||||
project: [path.join(__dirname, 'tsconfig.lib.json'), path.join(__dirname, 'tsconfig.spec.json')],
|
||||
createDefaultProgram: true
|
||||
},
|
||||
"rules": {
|
||||
}
|
||||
rules: {}
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
|
@ -41,19 +41,7 @@
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"executor": "@angular-eslint/builder:lint",
|
||||
"options": {
|
||||
"lintFilePatterns": [
|
||||
"projects/aca-content/**/*.ts",
|
||||
"projects/aca-content/**/*.html"
|
||||
],
|
||||
"cache": true,
|
||||
"cacheLocation": ".eslintcache",
|
||||
"ignorePath": ".eslintignore"
|
||||
},
|
||||
"outputs": [
|
||||
"{options.outputFile}"
|
||||
]
|
||||
"executor": "@angular-eslint/builder:lint"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,23 +1,15 @@
|
||||
path = require("path");
|
||||
const path = require('path');
|
||||
module.exports = {
|
||||
"extends": "../../.eslintrc.json",
|
||||
"ignorePatterns": [
|
||||
"!**/*"
|
||||
],
|
||||
"overrides": [
|
||||
extends: '../../.eslintrc.json',
|
||||
ignorePatterns: ['!**/*'],
|
||||
overrides: [
|
||||
{
|
||||
"files": [
|
||||
"*.ts"
|
||||
],
|
||||
"parserOptions": {
|
||||
"project": [
|
||||
path.join(__dirname, "tsconfig.lib.json"),
|
||||
path.join(__dirname, "tsconfig.spec.json")
|
||||
],
|
||||
"createDefaultProgram": true
|
||||
files: ['*.ts'],
|
||||
parserOptions: {
|
||||
project: [path.join(__dirname, 'tsconfig.lib.json'), path.join(__dirname, 'tsconfig.spec.json')],
|
||||
createDefaultProgram: true
|
||||
},
|
||||
"rules": {
|
||||
}
|
||||
rules: {}
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
|
@ -36,19 +36,7 @@
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"executor": "@angular-eslint/builder:lint",
|
||||
"options": {
|
||||
"lintFilePatterns": [
|
||||
"projects/aca-shared/**/*.ts",
|
||||
"projects/aca-shared/**/*.html"
|
||||
],
|
||||
"cache": true,
|
||||
"cacheLocation": ".eslintcache",
|
||||
"ignorePath": ".eslintignore"
|
||||
},
|
||||
"outputs": [
|
||||
"{options.outputFile}"
|
||||
]
|
||||
"executor": "@angular-eslint/builder:lint"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user