Skip to content

Commit

Permalink
infra: switch to @stylistic/eslint-plugin (#3069)
Browse files Browse the repository at this point in the history
  • Loading branch information
Shinigami92 authored Aug 30, 2024
1 parent 1a94e96 commit c850653
Show file tree
Hide file tree
Showing 3 changed files with 180 additions and 6 deletions.
19 changes: 15 additions & 4 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
/* eslint-disable @typescript-eslint/no-unsafe-argument */
import { fixupPluginRules, includeIgnoreFile } from '@eslint/compat';
import eslint from '@eslint/js';
import stylistic from '@stylistic/eslint-plugin';
import eslintPluginDeprecation from 'eslint-plugin-deprecation';
import eslintPluginJsdoc from 'eslint-plugin-jsdoc';
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
Expand Down Expand Up @@ -100,10 +101,6 @@ export default tseslint.config(
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/padding-line-between-statements': [
'error',
{ blankLine: 'always', prev: 'block-like', next: '*' },
],
'@typescript-eslint/prefer-regexp-exec': 'error',
'@typescript-eslint/restrict-plus-operands': [
'error',
Expand All @@ -129,6 +126,20 @@ export default tseslint.config(
},
//#endregion

//#region stylistic
{
plugins: {
'@stylistic': stylistic,
},
rules: {
'@stylistic/padding-line-between-statements': [
'error',
{ blankLine: 'always', prev: 'block-like', next: '*' },
],
},
},
//#endregion

//#region deprecation
{
plugins: {
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@
"@eslint-types/unicorn": "52.0.0",
"@eslint/compat": "1.1.1",
"@eslint/js": "9.9.0",
"@stylistic/eslint-plugin": "2.6.4",
"@types/node": "20.16.1",
"@types/sanitize-html": "2.13.0",
"@types/semver": "7.5.8",
Expand Down
166 changes: 164 additions & 2 deletions pnpm-lock.yaml

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

0 comments on commit c850653

Please sign in to comment.