prettier setup
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import js from "@eslint/js"
|
||||
import eslintConfigPrettier from "eslint-config-prettier"
|
||||
import onlyWarn from "eslint-plugin-only-warn"
|
||||
import turboPlugin from "eslint-plugin-turbo"
|
||||
import tseslint from "typescript-eslint"
|
||||
import js from '@eslint/js';
|
||||
import eslintConfigPrettier from 'eslint-config-prettier';
|
||||
import onlyWarn from 'eslint-plugin-only-warn';
|
||||
import turboPlugin from 'eslint-plugin-turbo';
|
||||
import tseslint from 'typescript-eslint';
|
||||
|
||||
/**
|
||||
* A shared ESLint configuration for the repository.
|
||||
@@ -18,7 +18,7 @@ export const config = [
|
||||
turbo: turboPlugin,
|
||||
},
|
||||
rules: {
|
||||
"turbo/no-undeclared-env-vars": "warn",
|
||||
'turbo/no-undeclared-env-vars': 'warn',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -27,6 +27,6 @@ export const config = [
|
||||
},
|
||||
},
|
||||
{
|
||||
ignores: ["dist/**"],
|
||||
ignores: ['dist/**'],
|
||||
},
|
||||
]
|
||||
];
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import js from "@eslint/js"
|
||||
import pluginNext from "@next/eslint-plugin-next"
|
||||
import eslintConfigPrettier from "eslint-config-prettier"
|
||||
import pluginReact from "eslint-plugin-react"
|
||||
import pluginReactHooks from "eslint-plugin-react-hooks"
|
||||
import globals from "globals"
|
||||
import tseslint from "typescript-eslint"
|
||||
import js from '@eslint/js';
|
||||
import pluginNext from '@next/eslint-plugin-next';
|
||||
import eslintConfigPrettier from 'eslint-config-prettier';
|
||||
import pluginReact from 'eslint-plugin-react';
|
||||
import pluginReactHooks from 'eslint-plugin-react-hooks';
|
||||
import globals from 'globals';
|
||||
import tseslint from 'typescript-eslint';
|
||||
|
||||
import { config as baseConfig } from "./base.js"
|
||||
import { config as baseConfig } from './base.js';
|
||||
|
||||
/**
|
||||
* A custom ESLint configuration for libraries that use Next.js.
|
||||
@@ -29,23 +29,23 @@ export const nextJsConfig = [
|
||||
},
|
||||
{
|
||||
plugins: {
|
||||
"@next/next": pluginNext,
|
||||
'@next/next': pluginNext,
|
||||
},
|
||||
rules: {
|
||||
...pluginNext.configs.recommended.rules,
|
||||
...pluginNext.configs["core-web-vitals"].rules,
|
||||
...pluginNext.configs['core-web-vitals'].rules,
|
||||
},
|
||||
},
|
||||
{
|
||||
plugins: {
|
||||
"react-hooks": pluginReactHooks,
|
||||
'react-hooks': pluginReactHooks,
|
||||
},
|
||||
settings: { react: { version: "detect" } },
|
||||
settings: { react: { version: 'detect' } },
|
||||
rules: {
|
||||
...pluginReactHooks.configs.recommended.rules,
|
||||
// React scope no longer necessary with new JSX transform.
|
||||
"react/react-in-jsx-scope": "off",
|
||||
"react/prop-types": "off",
|
||||
'react/react-in-jsx-scope': 'off',
|
||||
'react/prop-types': 'off',
|
||||
},
|
||||
},
|
||||
]
|
||||
];
|
||||
|
||||
24
packages/eslint-config/react-internal.js
vendored
24
packages/eslint-config/react-internal.js
vendored
@@ -1,11 +1,11 @@
|
||||
import js from "@eslint/js"
|
||||
import eslintConfigPrettier from "eslint-config-prettier"
|
||||
import pluginReact from "eslint-plugin-react"
|
||||
import pluginReactHooks from "eslint-plugin-react-hooks"
|
||||
import globals from "globals"
|
||||
import tseslint from "typescript-eslint"
|
||||
import js from '@eslint/js';
|
||||
import eslintConfigPrettier from 'eslint-config-prettier';
|
||||
import pluginReact from 'eslint-plugin-react';
|
||||
import pluginReactHooks from 'eslint-plugin-react-hooks';
|
||||
import globals from 'globals';
|
||||
import tseslint from 'typescript-eslint';
|
||||
|
||||
import { config as baseConfig } from "./base.js"
|
||||
import { config as baseConfig } from './base.js';
|
||||
|
||||
/**
|
||||
* A custom ESLint configuration for libraries that use React.
|
||||
@@ -28,14 +28,14 @@ export const config = [
|
||||
},
|
||||
{
|
||||
plugins: {
|
||||
"react-hooks": pluginReactHooks,
|
||||
'react-hooks': pluginReactHooks,
|
||||
},
|
||||
settings: { react: { version: "detect" } },
|
||||
settings: { react: { version: 'detect' } },
|
||||
rules: {
|
||||
...pluginReactHooks.configs.recommended.rules,
|
||||
// React scope no longer necessary with new JSX transform.
|
||||
"react/react-in-jsx-scope": "off",
|
||||
"react/prop-types": "off",
|
||||
'react/react-in-jsx-scope': 'off',
|
||||
'react/prop-types': 'off',
|
||||
},
|
||||
},
|
||||
]
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user