Skip to content

Commit

Permalink
feat: add eslint-plugin-n (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
capitnflam authored Mar 16, 2024
1 parent fe2bf30 commit 203d603
Show file tree
Hide file tree
Showing 5 changed files with 86 additions and 2 deletions.
78 changes: 77 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"eslint-config-prettier": "9.1.0",
"eslint-plugin-import": "2.29.1",
"eslint-plugin-jsx-a11y": "6.8.0",
"eslint-plugin-n": "16.6.2",
"eslint-plugin-no-unsanitized": "4.0.2",
"eslint-plugin-react": "7.34.1",
"eslint-plugin-react-hooks": "4.6.0",
Expand Down
6 changes: 6 additions & 0 deletions src/configs/node.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { type ESLintConfig } from '../types'

export const node: ESLintConfig = {
plugins: ['@flaminc'],
extends: ['plugin:n/recommended'],
}
1 change: 0 additions & 1 deletion src/configs/react.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { type ESLintConfig } from '../types'
export const react: ESLintConfig = {
plugins: ['@flaminc'],
extends: [
'plugin:@flaminc/recommended',
'plugin:react/recommended',
'plugin:react/jsx-runtime',
'plugin:react-hooks/recommended',
Expand Down
2 changes: 2 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@ import { type ESLint } from 'eslint'

import { name, version } from '../package.json'

import { node } from './configs/node'
import { react } from './configs/react'
import { recommended } from './configs/recommended'

const plugin: ESLint.Plugin = {
configs: {
node,
react,
recommended,
},
Expand Down

0 comments on commit 203d603

Please sign in to comment.