Skip to content

Commit

Permalink
Example: Improve ESLint v9 example
Browse files Browse the repository at this point in the history
  • Loading branch information
1aron committed Nov 27, 2024
1 parent 1578d11 commit 304e631
Show file tree
Hide file tree
Showing 10 changed files with 35 additions and 69 deletions.
48 changes: 0 additions & 48 deletions examples/eslint/.eslintrc.js

This file was deleted.

16 changes: 0 additions & 16 deletions examples/eslint/.vscode/settings.json

This file was deleted.

27 changes: 27 additions & 0 deletions examples/eslint/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import css from '@master/eslint-config-css'
import htmlParser from '@angular-eslint/template-parser'
import mdx from 'eslint-plugin-mdx'
import tseslint from 'typescript-eslint'

/** @type {import('eslint').Linter.Config[]} */
export default tseslint.config(
css,
{
rules: {
'@master/css/class-validation': ['error', {
disallowUnknownClass: true
}],
},
settings: {
'mdx/code-blocks': true,
},
},
{
files: ['**/*.html'],
languageOptions: {
parser: htmlParser
}
},
mdx.configs.flat,
tseslint.configs.recommended,
)
11 changes: 7 additions & 4 deletions examples/eslint/package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
{
"name": "master-css-eslint-example",
"type": "module",
"scripts": {
"lint": "eslint"
},
"devDependencies": {
"@angular-eslint/template-parser": "^16.3.1",
"@master/eslint-config-css": "workspace:^",
"@master/eslint-plugin-css": "workspace:^",
"shared": "workspace:^",
"@master/styled.react": "^2.0.2",
"@typescript-eslint/parser": "^6.21.0",
"clsx": "^2.1.0",
"eslint": "^8.57.0",
"eslint": "^9.0.0",
"eslint-mdx": "^2.3.4",
"eslint-plugin-mdx": "^2.3.4"
"eslint-plugin-mdx": "^2.3.4",
"typescript-eslint": "^8.15.0"
}
}
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions examples/eslint/src/know.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<button class="btn unknow">...</button>
File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion examples/eslint/unknow.html

This file was deleted.

0 comments on commit 304e631

Please sign in to comment.