Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update dependency eslint to v9 #1327

Merged
merged 4 commits into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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