Skip to content

Commit

Permalink
Improve(ESLint): Use plugin:@master/css/legacy instead of `@master/…
Browse files Browse the repository at this point in the history
…css`
  • Loading branch information
1aron committed Nov 27, 2024
1 parent 304e631 commit ac85723
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 11 deletions.
9 changes: 1 addition & 8 deletions examples/eslint-legacy/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@
const { resolve } = require('node:path')

/** @type {import('eslint').Linter.LegacyConfig} */
module.exports = {
extends: [
'@master/css',
'plugin:@master/css/legacy',
],
settings: {
'@master/css': {
config: resolve(__dirname, 'master.css')
}
},
overrides: [
{
files: [ '*.html'],
Expand Down
3 changes: 0 additions & 3 deletions packages/eslint-config/src/flat.ts

This file was deleted.

5 changes: 5 additions & 0 deletions packages/eslint-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@
"import": "./dist/index.mjs",
"require": "./dist/index.cjs",
"types": "./dist/index.d.ts"
},
"./configs/*": {
"import": "./dist/configs/*.mjs",
"require": "./dist/configs/*.cjs",
"types": "./dist/configs/*.d.ts"
}
},
"files": [
Expand Down
8 changes: 8 additions & 0 deletions packages/eslint-plugin/src/configs/legacy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import type { Linter } from 'eslint'
import recommended from './recommended'

export default {
plugins: ['@master/css'],
rules: recommended.rules,
parserOptions: recommended.languageOptions.parserOptions
} as Linter.LegacyConfig

0 comments on commit ac85723

Please sign in to comment.