0
Fork 0
mirror of https://github.com/penpot/penpot-plugins.git synced 2025-01-06 14:50:21 -05:00

fix(icons-plugin): fix linter

This commit is contained in:
María Valderrama 2024-05-10 11:09:14 +02:00
parent 7e09fbd9b3
commit 37d56664cb
4 changed files with 47 additions and 39 deletions

View file

@ -1,36 +0,0 @@
{
"extends": ["../../.eslintrc.base.json"],
"ignorePatterns": ["!**/*"],
"overrides": [
{
"files": ["*.ts"],
"extends": [
"plugin:@nx/angular",
"plugin:@angular-eslint/template/process-inline-templates"
],
"rules": {
"@angular-eslint/directive-selector": [
"error",
{
"type": "attribute",
"prefix": "app",
"style": "camelCase"
}
],
"@angular-eslint/component-selector": [
"error",
{
"type": "element",
"prefix": "app",
"style": "kebab-case"
}
]
}
},
{
"files": ["*.html"],
"extends": ["plugin:@nx/angular-template"],
"rules": {}
}
]
}

View file

@ -0,0 +1,43 @@
import baseConfig from '../../eslint.config.js';
import { compat } from '../../eslint.base.config.js';
export default [
...baseConfig,
...compat
.config({
extends: [
'plugin:@nx/angular',
'plugin:@angular-eslint/template/process-inline-templates',
],
})
.map((config) => ({
...config,
files: ['**/*.ts'],
rules: {
'@angular-eslint/directive-selector': [
'error',
{
type: 'attribute',
prefix: 'app',
style: 'camelCase',
},
],
'@angular-eslint/component-selector': [
'error',
{
type: 'element',
prefix: 'app',
style: 'kebab-case',
},
],
},
})),
...compat
.config({ extends: ['plugin:@nx/angular-template'] })
.map((config) => ({
...config,
files: ['**/*.html'],
rules: {},
})),
{ ignores: ['**/assets/*.js'] },
];

View file

@ -4,7 +4,7 @@
"projectType": "application",
"prefix": "app",
"sourceRoot": "apps/icons-plugin/src",
"tags": [],
"tags": ["type:plugin"],
"targets": {
"buildPlugin": {
"executor": "@nx/esbuild:esbuild",
@ -65,7 +65,8 @@
"sourceMap": true
}
},
"defaultConfiguration": "production"
"defaultConfiguration": "production",
"dependsOn": ["buildPlugin"]
},
"serve": {
"executor": "@angular-devkit/build-angular:dev-server",

View file

@ -1,5 +1,5 @@
{
"name": "Iccons plugin",
"name": "Icons plugin",
"code": "http://localhost:4202/assets/plugin.js",
"permissions": ["page:read", "file:read", "selection:read"]
}