Skip to content

Commit

Permalink
chore(deps): update dependency eslint to v9 (#1327)
Browse files Browse the repository at this point in the history
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: MikuroXina <[email protected]>
  • Loading branch information
renovate[bot] and MikuroXina authored Sep 3, 2024
1 parent c7566c7 commit 4adf0af
Show file tree
Hide file tree
Showing 7 changed files with 116 additions and 49 deletions.
Binary file modified bun.lockb
Binary file not shown.
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,20 @@
"prepare": "husky"
},
"devDependencies": {
"@eslint/eslintrc": "^3.1.0",
"@eslint/js": "^9.9.1",
"@trivago/prettier-plugin-sort-imports": "^4.1.1",
"@types/bun": "^1.0.2",
"@typescript-eslint/eslint-plugin": "^8.0.0",
"@typescript-eslint/parser": "^8.0.0",
"eslint": "8.57.0",
"eslint": "9.9.1",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-markdown": "^5.0.0",
"eslint-plugin-mdx": "^3.0.0",
"eslint-plugin-simple-import-sort": "^12.0.0",
"eslint-plugin-tsdoc": "^0.3.0",
"globals": "^15.9.0",
"husky": "^9.0.0",
"lint-staged": "^15.0.0",
"prettier": "^3.0.0",
Expand Down
26 changes: 0 additions & 26 deletions packages/bot/.eslintrc.yml

This file was deleted.

63 changes: 63 additions & 0 deletions packages/bot/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
import { FlatCompat } from '@eslint/eslintrc';
import js from '@eslint/js';
import typescriptEslint from '@typescript-eslint/eslint-plugin';
import tsParser from '@typescript-eslint/parser';
import markdown from 'eslint-plugin-markdown';
import tsdoc from 'eslint-plugin-tsdoc';
import globals from 'globals';
import path from 'node:path';
import { fileURLToPath } from 'node:url';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
});

export default [
...compat.extends(
'eslint:recommended',
'plugin:@typescript-eslint/strict-type-checked',
'plugin:@typescript-eslint/stylistic-type-checked',
'prettier'
),
{
plugins: {
'@typescript-eslint': typescriptEslint,
markdown,
tsdoc
},

languageOptions: {
globals: {
...globals.node
},

parser: tsParser,
ecmaVersion: 5,
sourceType: 'module',

parserOptions: {
project: true
}
},

rules: {
'max-params': 'error',
'tsdoc/syntax': 'warn',

'@typescript-eslint/restrict-template-expressions': [
'error',
{
allowNumber: true
}
]
}
},
{
files: ['**/*.md'],
processor: 'markdown/markdown'
}
];
21 changes: 0 additions & 21 deletions packages/docs/.eslintrc.yml

This file was deleted.

48 changes: 48 additions & 0 deletions packages/docs/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import typescriptEslint from "@typescript-eslint/eslint-plugin";
import react from "eslint-plugin-react";
import globals from "globals";
import path from "node:path";
import { fileURLToPath } from "node:url";
import js from "@eslint/js";
import { FlatCompat } from "@eslint/eslintrc";

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
});

export default [...compat.extends(
"prettier",
"eslint:recommended",
"plugin:mdx/recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended",
"plugin:mdx/recommended",
), {
plugins: {
"@typescript-eslint": typescriptEslint,
react,
},

languageOptions: {
globals: {
...globals.browser,
...globals.node,
},
},

settings: {
"mdx/code-blocks": true,

react: {
version: "detect",
},
},

rules: {
"max-params": "error",
},
}];
2 changes: 1 addition & 1 deletion packages/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"scripts": {
"dev": "gatsby develop",
"build": "gatsby build",
"lint": "eslint --ignore-path .gitignore \"./{src,pages}/**/*.{js,ts,jsx,tsx,md,mdx}\"",
"lint": "eslint \"./{src,pages}/**/*.{js,ts,jsx,tsx,md,mdx}\"",
"format": "prettier --write \"./{src,pages}/**/*.{js,ts,jsx,tsx,md,mdx}\""
},
"dependencies": {
Expand Down

0 comments on commit 4adf0af

Please sign in to comment.