Skip to content

Commit

Permalink
chore: fix lint configs in packages (#3017)
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverschuerch authored May 1, 2024
1 parent 2bf97c6 commit 03b052c
Show file tree
Hide file tree
Showing 22 changed files with 155 additions and 200 deletions.
40 changes: 40 additions & 0 deletions packages/components-angular/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
module.exports = {
root: true,
ignorePatterns: ['**/.eslintrc.js', 'dist', 'projects/**/*'],
overrides: [
{
files: ['*.ts'],
parserOptions: {
project: ['tsconfig.json'],
createDefaultProgram: true,
},
extends: [
'plugin:@angular-eslint/recommended',
'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:@angular-eslint/template/recommended'],
rules: {},
},
],
};
40 changes: 0 additions & 40 deletions packages/components-angular/.eslintrc.json

This file was deleted.

4 changes: 2 additions & 2 deletions packages/components-angular/projects/components/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {
extends: '../../.eslintrc.json',
ignorePatterns: ['!**/*', 'node_modules'],
extends: '../../.eslintrc.js',
ignorePatterns: ['!**/*', 'src/lib/stencil-generated', 'node_modules'],
overrides: [
{
files: ['*.ts'],
Expand Down
2 changes: 0 additions & 2 deletions packages/components-react/.eslintignore

This file was deleted.

22 changes: 22 additions & 0 deletions packages/components-react/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
module.exports = {
env: {
es2021: true,
},
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:@typescript-eslint/recommended',
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
},
ignorePatterns: ['.eslintrc.js', 'dist', 'src/components/stencil-generated'],
plugins: ['react', '@typescript-eslint'],
settings: {
react: {
version: 'detect',
},
},
};
28 changes: 0 additions & 28 deletions packages/components-react/.eslintrc.json

This file was deleted.

3 changes: 2 additions & 1 deletion packages/components-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"build": "pnpm run clean && pnpm run compile",
"clean": "rimraf dist",
"compile": "pnpm run tsc",
"tsc": "tsc -p ."
"tsc": "tsc -p .",
"lint": "eslint src/**/*.ts"
},
"dependencies": {
"@swisspost/design-system-components": "workspace:7.0.0"
Expand Down
10 changes: 0 additions & 10 deletions packages/components/.eslintignore

This file was deleted.

11 changes: 10 additions & 1 deletion packages/components/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,16 @@ module.exports = {
],
overrides: [],
parser: '@typescript-eslint/parser',
ignorePatterns: ['.eslintrc.js'],
ignorePatterns: [
'.eslintrc.js',
'.stencil',
'cypress',
'cypress.config.js',
'dist',
'loader',
'stencil.config.ts',
'www',
],
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
Expand Down
2 changes: 0 additions & 2 deletions packages/demo/.eslintignore

This file was deleted.

2 changes: 1 addition & 1 deletion packages/demo/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {
root: true,
ignorePatterns: ['projects/**/*'],
ignorePatterns: ['.eslintrc.js', 'dist', '.angular'],
overrides: [
{
files: ['*.ts'],
Expand Down
10 changes: 0 additions & 10 deletions packages/internet-header/.eslintignore

This file was deleted.

11 changes: 11 additions & 0 deletions packages/internet-header/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
module.exports = {
extends: ['plugin:@stencil-community/recommended'],
ignorePatterns: [
'.eslintrc.js',
'.stencil',
'cypress',
'cypress.config.js',
'dist',
'loader',
'src/assets',
'stencil.config.ts',
'www',
],
parserOptions: {
sourceType: 'module',
ecmaVersion: 2020,
Expand Down
1 change: 1 addition & 0 deletions packages/internet-header/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
"cypress": "13.7.2",
"cypress-each": "1.14.0",
"cypress-storybook": "0.5.1",
"eslint": "8.57.0",
"eslint-plugin-react": "7.34.1",
"globby": "14.0.1",
"jest": "29.7.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/internet-header/tsconfig.eslint.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "./tsconfig.json",
"include": ["src", "**/tests", "cypress"],
"include": ["src", "**/tests"],
"exclude": ["node_modules"]
}
40 changes: 40 additions & 0 deletions packages/intranet-header-workspace/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
module.exports = {
root: true,
ignorePatterns: ['**/.eslintrc.js', 'dist', 'projects/**/*'],
overrides: [
{
files: ['*.ts'],
parserOptions: {
project: ['tsconfig.json'],
createDefaultProgram: true,
},
extends: [
'plugin:@angular-eslint/recommended',
'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:@angular-eslint/template/recommended'],
rules: {},
},
],
};
50 changes: 0 additions & 50 deletions packages/intranet-header-workspace/.eslintrc.json

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = {
extends: '../../.eslintrc.json',
extends: '../../.eslintrc.js',
ignorePatterns: ['!**/*', 'node_modules'],
overrides: [
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = {
extends: '../../.eslintrc.json',
extends: '../../.eslintrc.js',
ignorePatterns: ['!**/*', 'node_modules'],
overrides: [
{
Expand Down
4 changes: 4 additions & 0 deletions packages/nextjs-integration/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
extends: 'next/core-web-vitals',
ignorePatterns: ['.eslintrc.js', 'next.config.js', 'postcss.config.js'],
};
3 changes: 0 additions & 3 deletions packages/nextjs-integration/.eslintrc.json

This file was deleted.

Loading

0 comments on commit 03b052c

Please sign in to comment.