Skip to content

Commit

Permalink
update readme, restore peer deps
Browse files Browse the repository at this point in the history
  • Loading branch information
joephela committed Jul 11, 2024
1 parent bbe6892 commit dd879d7
Show file tree
Hide file tree
Showing 6 changed files with 90 additions and 2,001 deletions.
7 changes: 0 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,9 @@
"@changesets/cli": "^2.27.7",
"@eslint/eslintrc": "^3.1.0",
"@eslint/js": "^9.6.0",
"@types/jest": "^29.5.12",
"@typescript-eslint/eslint-plugin": "^7.16.0",
"@typescript-eslint/parser": "^7.16.0",
"eslint": "^9.6.0",
"eslint-plugin-jest": "^28.6.0",
"eslint-plugin-jsx-a11y": "^6.9.0",
"eslint-plugin-playwright": "^1.6.2",
"eslint-plugin-react": "^7.34.3",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-sort": "^3.0.2",
"globals": "^15.8.0",
"jest": "^29.7.0",
"prettier": "^3.3.2",
Expand Down
40 changes: 23 additions & 17 deletions packages/eslint-config-widen/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,27 @@ yarn add -D eslint-plugin-jest

## Usage

In your `.eslintrc` file, add the following four entries to your extends list.
If you don't need a specific configuration, simply remove it from the list.

```json
{
"extends": ["widen", "widen/typescript", "widen/react"],
"overrides": [
{
"files": ["e2e/**"],
"extends": "widen/playwright"
},
{
"files": ["frontend/**/*.spec.js"],
"extends": "widen/jest"
}
]
}
In your `eslint.config.mjs` file, add the following four entries to your extends
list. If you don't need a specific configuration, simply remove it from the
list.

```js
import { base, typescript, react, playwright, jest } from 'eslint-config-widen'

export default [
// Base Widen configurations
...base,
...typescript,
...react,

// Overrides for specific directories
{
files: ['e2e/**'],
...playwright,
},
{
files: ['frontend/**'],
...jest,
},
]
```
8 changes: 4 additions & 4 deletions packages/eslint-config-widen/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@
"@typescript-eslint/eslint-plugin": "^6.9.1",
"@typescript-eslint/parser": "^6.9.1",
"eslint": ">= 9",
"eslint-plugin-jest": ">= 27",
"eslint-plugin-jest": ">= 28",
"eslint-plugin-jsx-a11y": ">= 6",
"eslint-plugin-playwright": ">=0.16.0",
"eslint-plugin-playwright": ">=1.0.0",
"eslint-plugin-react": ">= 7",
"eslint-plugin-react-hooks": ">= 4",
"eslint-plugin-sort": ">= 2",
"eslint-plugin-widen": ">=2.0.0"
"eslint-plugin-sort": ">= 3",
"eslint-plugin-widen": ">=3.0.0"
},
"peerDependenciesMeta": {
"@typescript-eslint/eslint-plugin": {
Expand Down
1 change: 1 addition & 0 deletions packages/eslint-config-widen/src/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ declare module 'globals'
declare module 'eslint-plugin-sort'
declare module 'eslint-plugin-widen'
declare module '@babel/eslint-parser'
declare module 'eslint-plugin-playwright'
26 changes: 16 additions & 10 deletions packages/eslint-plugin-widen/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,22 @@ yarn add --dev eslint-plugin-widen

## Usage

Add the following to your `.eslintrc` file.

```json
{
"plugins": ["widen"],
"rules": {
"widen/jsx-fragments": "error",
"widen/jsx-import": "error"
}
}
Add the following to your `eslint.config.mjs` file.

```js
import widen from 'eslint-plugin-widen'

export default [
{
plugins: {
widen,
},
rules: {
'widen/jsx-fragments': 'error',
'widen/jsx-import': 'error',
},
},
]
```

## List of Supported Rules
Expand Down
Loading

0 comments on commit dd879d7

Please sign in to comment.