Skip to content

Commit

Permalink
Release (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
capitnflam authored Mar 17, 2024
2 parents f5fba1e + e4b8cff commit 418d02e
Show file tree
Hide file tree
Showing 5 changed files with 86 additions and 0 deletions.
30 changes: 30 additions & 0 deletions package-lock.json

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

6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"eslint-plugin-security": "2.1.1",
"eslint-plugin-sonarjs": "0.24.0",
"eslint-plugin-unicorn": "51.0.1",
"eslint-plugin-vitest": "0.3.26",
"eslint-plugin-xss": "0.1.12"
},
"devDependencies": {
Expand Down Expand Up @@ -60,6 +61,11 @@
"eslint": ">=8",
"react": ">=16.8"
},
"peerDependenciesMeta": {
"react": {
"optional": true
}
},
"publishConfig": {
"access": "public"
},
Expand Down
8 changes: 8 additions & 0 deletions src/configs/node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,12 @@ import { type ESLintConfig } from '../types'
export const node: ESLintConfig = {
plugins: ['@flaminc'],
extends: ['plugin:n/recommended'],
overrides: [
{
files: ['*.ts', '*.tsx'],
rules: {
'n/no-missing-import': 'off',
},
},
],
}
40 changes: 40 additions & 0 deletions src/configs/vitest.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import { type ESLintConfig } from '../types'

export const vitest: ESLintConfig = {
plugins: ['@flaminc'],
overrides: [
{
files: ['**/*.spec.ts'],
plugins: ['vitest'],
extends: ['plugin:vitest/recommended'],
rules: {
'vitest/consistent-test-it': [
'error',
{ fn: 'it', withinDescribe: 'it' },
],
'vitest/no-alias-methods': 'error',
'vitest/no-conditional-expect': 'error',
'vitest/no-conditional-in-test': 'error',
'vitest/no-conditional-tests': 'error',
'vitest/no-disabled-tests': 'warn',
'vitest/no-focused-tests': 'error',
'vitest/no-hooks': 'off',
'vitest/no-standalone-expect': 'error',
'vitest/prefer-each': 'error',
'vitest/prefer-comparison-matcher': 'error',
'vitest/prefer-equality-matcher': 'error',
'vitest/prefer-expect-resolves': 'error',
'vitest/prefer-hooks-in-order': 'error',
'vitest/prefer-hooks-on-top': 'error',
'vitest/prefer-lowercase-title': 'error',
'vitest/prefer-mock-promise-shorthand': 'error',
'vitest/prefer-spy-on': 'error',
'vitest/prefer-strict-equal': 'error',
'vitest/prefer-to-have-length': 'error',
'vitest/prefer-todo': 'error',
'vitest/require-hook': 'error',
'vitest/require-top-level-describe': 'error',
},
},
],
}
2 changes: 2 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ import { name, version } from '../package.json'
import { node } from './configs/node'
import { react } from './configs/react'
import { recommended } from './configs/recommended'
import { vitest } from './configs/vitest'

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

0 comments on commit 418d02e

Please sign in to comment.