Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ESLint): update ESLint dependency to v9.x and move to flat config #1297

Merged
merged 13 commits into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,15 @@ jobs:
- run:
name: 🧾 NX report
command: npx nx report
- run:
name: ⏳ Build Libraries
command: npx nx affected -t build --exclude='*,!tag:publishable' --parallel=3 --base=$NX_BASE --head=$NX_HEAD
- run:
name: 🩺 Run Linters
command: npx nx affected -t lint --exclude='*,!tag:publishable' --parallel=3 --base=$NX_BASE --head=$NX_HEAD
- run:
name: 🧰 Run Unit Tests
command: npx nx affected -t test --exclude='*,!tag:core' --parallel=3 --base=$NX_BASE --head=$NX_HEAD --ci --runInBand
- run:
name: ⏳ Build Libraries
command: npx nx affected -t build --exclude='*,!tag:publishable' --parallel=3 --base=$NX_BASE --head=$NX_HEAD
- run:
name: 🧪 Run E2E Tests
command: npx nx affected -t e2e --exclude='*,!tag:core' --parallel=3 --base=$NX_BASE --head=$NX_HEAD --ci --code-coverage --runInBand
Expand Down
14 changes: 0 additions & 14 deletions .eslintrc.json

This file was deleted.

4 changes: 0 additions & 4 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,6 @@
matchPackagePrefixes: ['typescript'],
allowedVersions: '<5.6.0',
},
{
groupName: 'Typescript-Eslint',
matchPackagePrefixes: ['@typescript-eslint'],
},
/**
* Ignore eslint updates for v9.0.0 and above
*/
Expand Down
3 changes: 0 additions & 3 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no -- commitlint --edit ${1}
2 changes: 1 addition & 1 deletion .sonarcloud.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ sonar.testExecutionReportPaths=packages/beeq/test-report.xml
sonar.javascript.lcov.reportPaths=packages/beeq/coverage/lcov.info

# Exclusions for copy-paste detection
sonar.cpd.exclusions=packages/bee-q/src/components/**/*,packages/bee-q/src/shared/**/__test__/**/*,packages/beeq-tailwindcss/src/plugins/*
sonar.cpd.exclusions=packages/beeq/src/components/**/*,packages/beeq/src/shared/**/__test__/**/*,packages/beeq-tailwindcss/src/plugins/*,packages/**/eslint.config.js
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"files.associations": {
"*.json5": "json5",
},
"html.customData": ["./dist/bee-q/custom-elements.json"],
"html.customData": ["./packages/beeq/custom-elements.json"],
"less.validate": false,
"scss.validate": false,
"stylelint.validate": [
Expand Down
30 changes: 30 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
const globals = require('globals');
const jsESLint = require('@eslint/js');
const nxESLint = require('@nx/eslint-plugin');
const jsoncParser = require('jsonc-eslint-parser');
const prettierPlugin = require('eslint-plugin-prettier');

/** @type { import("eslint").Linter.Config[] } */
module.exports = [
jsESLint.configs.recommended,
prettierPlugin,
{ ignores: ['node_modules', '!.storybook', 'dist'] },
{
plugins: {
'@nx': nxESLint,
},
languageOptions: {
globals: {
...globals.browser,
...globals.node,
},
},
},
{
files: ['**/*.json'],
languageOptions: {
parser: jsoncParser,
},
rules: { '@nx/dependency-checks': 'error' },
},
];
5 changes: 2 additions & 3 deletions nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"!{projectRoot}/**/*.spec.ts",
"!{projectRoot}/tsconfig.spec.json",
"!{projectRoot}/jest.config.ts",
"!{projectRoot}/.eslintrc.json"
"!{projectRoot}/eslint.config.js"
]
},
"targetDefaults": {
Expand All @@ -27,7 +27,6 @@
"cache": true
},
"test": {
"dependsOn": [{ "target": "build", "projects": "beeq" }],
"inputs": ["default", "^default", "{workspaceRoot}/jest.preset.js"],
"cache": true
},
Expand Down Expand Up @@ -62,7 +61,7 @@
},
"@nx/eslint:lint": {
"cache": true,
"inputs": ["default", "{workspaceRoot}/.eslintrc.json", "{workspaceRoot}/tools/eslint-rules/**/*"]
"inputs": ["default", "{workspaceRoot}/eslint.config.js"]
}
},
"nxCloudAccessToken": "ZTI2Yzg0YzktODZiMi00Yjg2LTlhMmMtYWI3NDhkODkzZjlmfHJlYWQtb25seQ==",
Expand Down
Loading