mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-10-06 02:47:56 +00:00
73 lines
1.7 KiB
JavaScript
73 lines
1.7 KiB
JavaScript
import globals from 'globals';
|
|
|
|
import js from '@eslint/js';
|
|
import eslintConfigPrettier from 'eslint-config-prettier';
|
|
import tseslint from 'typescript-eslint';
|
|
import pluginReactHooks from 'eslint-plugin-react-hooks';
|
|
import pluginReact from 'eslint-plugin-react';
|
|
import pluginNext from '@next/eslint-plugin-next';
|
|
// import turboPlugin from 'eslint-plugin-turbo';
|
|
import onlyWarn from 'eslint-plugin-only-warn';
|
|
|
|
/** @type {import("eslint").Linter.Config} */
|
|
export default [
|
|
js.configs.recommended,
|
|
eslintConfigPrettier,
|
|
...tseslint.configs.recommended,
|
|
// {
|
|
// plugins: {
|
|
// turbo: turboPlugin,
|
|
// },
|
|
// rules: {
|
|
// 'turbo/no-undeclared-env-vars': 'warn',
|
|
// },
|
|
// },
|
|
{
|
|
plugins: {
|
|
onlyWarn,
|
|
},
|
|
},
|
|
{
|
|
ignores: ['dist/**', '.next', 'storybook-static'],
|
|
},
|
|
{
|
|
...pluginReact.configs.flat.recommended,
|
|
languageOptions: {
|
|
...pluginReact.configs.flat.recommended.languageOptions,
|
|
globals: {
|
|
...globals.serviceworker,
|
|
},
|
|
},
|
|
},
|
|
{
|
|
plugins: {
|
|
'@next/next': pluginNext,
|
|
},
|
|
rules: {
|
|
...pluginNext.configs.recommended.rules,
|
|
...pluginNext.configs['core-web-vitals'].rules,
|
|
},
|
|
},
|
|
{
|
|
plugins: {
|
|
'react-hooks': pluginReactHooks,
|
|
},
|
|
settings: { react: { version: 'detect' } },
|
|
rules: {
|
|
...pluginReactHooks.configs.recommended.rules,
|
|
// React scope no longer necessary with new JSX transform.
|
|
'react/react-in-jsx-scope': 'off',
|
|
},
|
|
},
|
|
{
|
|
rules: {
|
|
'no-unused-vars': 'off',
|
|
'@typescript-eslint/no-unused-vars': [
|
|
'error',
|
|
{
|
|
caughtErrorsIgnorePattern: '^_',
|
|
},
|
|
],
|
|
},
|
|
},
|
|
];
|