mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +00:00
[ci:force] - Improved eslint plugin so it can be built with standard action
This commit is contained in:
@@ -23,3 +23,4 @@ nxcache
|
|||||||
.husky
|
.husky
|
||||||
.cursor/rules/nx-rules.mdc
|
.cursor/rules/nx-rules.mdc
|
||||||
.github/instructions/nx.instructions.md
|
.github/instructions/nx.instructions.md
|
||||||
|
lib/eslint-angular/dist/
|
||||||
|
|||||||
@@ -1,8 +1 @@
|
|||||||
require('ts-node').register({
|
module.exports = require('./dist/index.js');
|
||||||
compilerOptions: {
|
|
||||||
module: 'commonjs',
|
|
||||||
target: 'es2019',
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
module.exports = require('./index.ts');
|
|
||||||
|
|||||||
@@ -9,16 +9,9 @@
|
|||||||
"executor": "@nx/js:tsc",
|
"executor": "@nx/js:tsc",
|
||||||
"outputs": ["{options.outputPath}"],
|
"outputs": ["{options.outputPath}"],
|
||||||
"options": {
|
"options": {
|
||||||
"outputPath": "dist/libs/eslint-plugin-eslint-angular",
|
"outputPath": "lib/eslint-angular/dist",
|
||||||
"main": "lib/eslint-angular/index.ts",
|
"main": "lib/eslint-angular/index.ts",
|
||||||
"tsConfig": "lib/eslint-angular/tsconfig.lib.prod.json"
|
"tsConfig": "lib/eslint-angular/tsconfig.lib.json"
|
||||||
},
|
|
||||||
"configurations": {
|
|
||||||
"production": {
|
|
||||||
"optimization": true,
|
|
||||||
"sourceMap": false,
|
|
||||||
"extractLicenses": true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lint": {
|
"lint": {
|
||||||
|
|||||||
+8
-4
@@ -41,7 +41,8 @@ const nodeToReport = (node: TSESTree.Node) => {
|
|||||||
if (!ASTUtils.isProperty(node)) {
|
if (!ASTUtils.isProperty(node)) {
|
||||||
return node;
|
return node;
|
||||||
}
|
}
|
||||||
return ASTUtils.isMemberExpression(node.value) ? node.value.property : node.value;
|
const propertyNode = node as TSESTree.Property;
|
||||||
|
return ASTUtils.isMemberExpression(propertyNode.value) ? propertyNode.value.property : propertyNode.value;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -88,9 +89,12 @@ export default createESLintRule<unknown[], MessageIds>({
|
|||||||
moduleName: '@angular/core',
|
moduleName: '@angular/core',
|
||||||
node: node.parent
|
node: node.parent
|
||||||
}),
|
}),
|
||||||
ASTUtils.isMemberExpression(node.value)
|
(() => {
|
||||||
? fixer.replaceText(node.value.property, 'None')
|
const propValue = (node as TSESTree.Property).value;
|
||||||
: fixer.replaceText(node.value, viewEncapsulationNone)
|
return ASTUtils.isMemberExpression(propValue)
|
||||||
|
? fixer.replaceText(propValue.property, 'None')
|
||||||
|
: fixer.replaceText(propValue, viewEncapsulationNone);
|
||||||
|
})()
|
||||||
].filter(isNotNullOrUndefined);
|
].filter(isNotNullOrUndefined);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
{
|
{
|
||||||
"extends": "./tsconfig.json",
|
"extends": "./tsconfig.json",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"outDir": "../../dist/out-tsc",
|
"outDir": "./dist",
|
||||||
"declarationMap": true
|
"declaration": true
|
||||||
},
|
},
|
||||||
"exclude": ["src/test.ts", "**/*.spec.ts", "**/*.test.ts"],
|
"exclude": ["src/test.ts", "**/*.spec.ts", "**/*.test.ts", "dist"],
|
||||||
"include": ["**/*.ts"]
|
"include": ["**/*.ts"]
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-1
@@ -5,7 +5,7 @@
|
|||||||
"author": "Hyland Software, Inc. and its affiliates",
|
"author": "Hyland Software, Inc. and its affiliates",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"preinstall": "npx only-allow pnpm",
|
"preinstall": "npx only-allow pnpm",
|
||||||
"prepare": "husky && node scripts/post-install-check.mjs",
|
"prepare": "husky && nx run eslint-angular:build && node scripts/post-install-check.mjs",
|
||||||
"add": "node scripts/safe-add.mjs",
|
"add": "node scripts/safe-add.mjs",
|
||||||
"bundle:js-api": "nx run js-api:bundle",
|
"bundle:js-api": "nx run js-api:bundle",
|
||||||
"bundle:cli": "nx run cli:bundle",
|
"bundle:cli": "nx run cli:bundle",
|
||||||
@@ -83,6 +83,7 @@
|
|||||||
"@angular-eslint/eslint-plugin": "19.8.1",
|
"@angular-eslint/eslint-plugin": "19.8.1",
|
||||||
"@angular-eslint/eslint-plugin-template": "19.8.1",
|
"@angular-eslint/eslint-plugin-template": "19.8.1",
|
||||||
"@angular-eslint/template-parser": "19.8.1",
|
"@angular-eslint/template-parser": "19.8.1",
|
||||||
|
"@angular-eslint/utils": "19.8.1",
|
||||||
"@angular/compiler-cli": "19.2.20",
|
"@angular/compiler-cli": "19.2.20",
|
||||||
"@chromatic-com/storybook": "4.1.3",
|
"@chromatic-com/storybook": "4.1.3",
|
||||||
"@nx/angular": "22.7.4",
|
"@nx/angular": "22.7.4",
|
||||||
|
|||||||
Generated
+3
@@ -132,6 +132,9 @@ importers:
|
|||||||
'@angular-eslint/template-parser':
|
'@angular-eslint/template-parser':
|
||||||
specifier: 19.8.1
|
specifier: 19.8.1
|
||||||
version: 19.8.1(eslint@8.57.1)(typescript@5.8.3)
|
version: 19.8.1(eslint@8.57.1)(typescript@5.8.3)
|
||||||
|
'@angular-eslint/utils':
|
||||||
|
specifier: 19.8.1
|
||||||
|
version: 19.8.1(@typescript-eslint/utils@8.59.4(eslint@8.57.1)(typescript@5.8.3))(eslint@8.57.1)(typescript@5.8.3)
|
||||||
'@angular/compiler-cli':
|
'@angular/compiler-cli':
|
||||||
specifier: 19.2.20
|
specifier: 19.2.20
|
||||||
version: 19.2.20(@angular/compiler@19.2.20)(typescript@5.8.3)
|
version: 19.2.20(@angular/compiler@19.2.20)(typescript@5.8.3)
|
||||||
|
|||||||
Reference in New Issue
Block a user