Skip to content

Commit

Permalink
chore(core): update to latest stencil eslint rules (#1537)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielleroux authored Nov 4, 2024
1 parent 8bf9ad4 commit 3fbef34
Show file tree
Hide file tree
Showing 10 changed files with 215 additions and 16 deletions.
11 changes: 9 additions & 2 deletions packages/core/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
{
"root": true,
"parserOptions": {
"project": "./tsconfig.json"
"project": "./tsconfig.lib.json"
},
"extends": [/* "plugin:@typescript-eslint/recommended", */ "plugin:@stencil-community/recommended", "ix"],
"extends": [
/* "plugin:@typescript-eslint/recommended", */ "plugin:@stencil-community/recommended",
"eslint-config-ix/index.js"
],
"rules": {
"@stencil-community/async-methods": 0,
"@stencil-community/own-props-must-be-private": 0,
"@stencil-community/own-methods-must-be-private": 0,
"@stencil-community/strict-boolean-conditions": 0,
"@stencil-community/ban-default-true": ["warn"],
"@stencil-community/decorators-style": [
"error",
{ "prop": "inline", "method": "multiline" }
],
"react/jsx-no-bind": 0,
"react/jsx-uses-react": 0,
"react/react-in-jsx-scope": 0,
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"devDependencies": {
"@playwright/test": "^1.32.1",
"@siemens/ix-icons": "^2.0.0",
"@stencil-community/eslint-plugin": "^0.7.1",
"@stencil-community/eslint-plugin": "^0.7.2",
"@stencil-community/postcss": "^2.2.0",
"@stencil/angular-output-target": "^0.8.3",
"@stencil/react-output-target": "^0.5.3",
Expand Down
1 change: 1 addition & 0 deletions packages/core/stencil.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import autoprefixer from 'autoprefixer';
import { customComponentDocGenerator, getDevAssets } from './scripts/build/dev';

export const config: Config = {
tsconfig: 'tsconfig.lib.json',
globalScript: './src/setup.ts',
extras: {
appendChildSlotFix: true,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
{
"extends": "./tsconfig.json",
"extends": "./tsconfig.lib.json",
"compilerOptions": {
"noEmit": true,
"strict": true,
"strictNullChecks": true,
"strictPropertyInitialization": true,
"noImplicitAny": true,
"baseUrl": ".",
"pretty": false,
"skipLibCheck": true
Expand Down
2 changes: 1 addition & 1 deletion packages/core/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@
// "strictPropertyInitialization": true,
// "noImplicitAny": true
},
"include": ["src"],
"include": ["src", "playwright.config.ts", "playwright-ct.config.ts"],
"exclude": ["node_modules"]
}
30 changes: 30 additions & 0 deletions packages/core/tsconfig.lib.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"allowSyntheticDefaultImports": true,
"allowUnreachableCode": false,
"declaration": true,
"experimentalDecorators": true,
"lib": ["dom", "es2017"],
"moduleResolution": "node",
"module": "esnext",
"target": "es2017",
"noUnusedLocals": true,
"noUnusedParameters": true,
"jsx": "react",
"jsxFactory": "h",
"preserveSymlinks": false,
"skipLibCheck": true,
"baseUrl": ".",
"paths": {
"@utils/test": ["src/tests/utils/test"]
}
// Strict check uncomment to check for strict
// "strict": true,
// "strictNullChecks": true,
// "strictPropertyInitialization": true,
// "noImplicitAny": true
},
"include": ["src"],
"exclude": ["node_modules", "playwright.config.ts", "playwright-ct.config.ts"]
}
4 changes: 4 additions & 0 deletions packages/eslint-config-ix/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
"license": "MIT",
"version": "1.0.0",
"main": "index.js",
"files": [
"index.js"
],
"private": true,
"dependencies": {
"eslint": "~8.21.0",
Expand All @@ -12,4 +15,5 @@
"eslint-plugin-turbo": "^2.0.4",
"prettier": "^3.0.3"
}

}
2 changes: 1 addition & 1 deletion packages/react/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"eslint:recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
"ix"
"eslint-config-ix/index.js"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
Expand Down
Loading

0 comments on commit 3fbef34

Please sign in to comment.