#2 create pretier, eslint

parent 04dff646
node_modules
build
.next
dist
\ No newline at end of file
module.exports = {
tabWidth: 2,
singleQuote: true,
trailingComma: 'es5',
printWidth: 100,
useTabs: false,
};
import js from '@eslint/js' module.exports = {
import globals from 'globals' root: true,
import reactHooks from 'eslint-plugin-react-hooks' env: { browser: true, es2020: true },
import reactRefresh from 'eslint-plugin-react-refresh' extends: [
import tseslint from 'typescript-eslint' 'eslint:recommended',
'plugin:@typescript-eslint/recommended',
export default tseslint.config( 'plugin:react-hooks/recommended',
{ ignores: ['dist'] }, 'prettier',
{ 'plugin:react/recommended',
extends: [js.configs.recommended, ...tseslint.configs.recommended], ],
files: ['**/*.{ts,tsx}'], ignorePatterns: ['dist', '.eslintrc.cjs'],
languageOptions: { parser: '@typescript-eslint/parser',
ecmaVersion: 2020, parserOptions: {
globals: globals.browser, ecmaFeatures: {
jsx: true,
}, },
plugins: { ecmaVersion: 'latest',
'react-hooks': reactHooks, sourceType: 'module',
'react-refresh': reactRefresh, // project: './tsconfig.json',
}, },
plugins: ['react-refresh', 'react', '@typescript-eslint', 'prettier'],
rules: { rules: {
...reactHooks.configs.recommended.rules, 'react-refresh/only-export-components': ['warn', { allowConstantExport: true }],
'react-refresh/only-export-components': [ 'react/react-in-jsx-scope': 0,
'warn', },
{ allowConstantExport: true }, settings: {
], 'import/resolver': {
typescript: {},
}, },
}, },
) };
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment