Skip to content

Commit

Permalink
feat(react-runtime): ajustes no eslint runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
andrefelipeschulle committed Jun 27, 2024
1 parent 428a5cb commit 55338ee
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 154 deletions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@brainylab/eslint-config",
"version": "2.4.2",
"version": "2.4.3",
"description": "ESLint config for BrainyLab projects",
"keywords": [
"eslint",
Expand Down Expand Up @@ -47,7 +47,6 @@
"eslint-config-prettier": "9.1.0",
"eslint-define-config": "2.1.0",
"eslint-plugin-import-x": "0.5.1",
"eslint-plugin-jsx-a11y": "6.9.0",
"eslint-plugin-n": "17.9.0",
"eslint-plugin-react": "7.34.3",
"eslint-plugin-react-hooks": "4.6.2",
Expand Down
146 changes: 0 additions & 146 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions src/plugins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ import * as _pluginReactHook from 'eslint-plugin-react-hooks';
export const pluginReactHook: typeof import('eslint-plugin-react-hooks') =
interopDefault(_pluginReactHook);

import * as _pluginJsxA11y from 'eslint-plugin-jsx-a11y';
export const pluginJsxA11y: typeof import('eslint-plugin-jsx-a11y') =
interopDefault(_pluginJsxA11y);

import * as _configPrettier from 'eslint-config-prettier';
export const configPrettier: any = interopDefault(_configPrettier);

Expand Down
7 changes: 7 additions & 0 deletions src/presets/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,13 @@ export const base = [
pathGroupsExcludedImportTypes: ['type'],
},
],
'no-restricted-syntax': [
'error',
{
selector: 'ExportDefaultDeclaration',
message: 'Prefer named exports',
},
],
},
},
configPrettier,
Expand Down
5 changes: 3 additions & 2 deletions src/presets/react.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import globals from 'globals';

import { pluginJsxA11y, pluginReact, pluginReactHook } from '../plugins';
import { pluginReact, pluginReactHook } from '../plugins';

export const react = [
{
files: ['*.jsx', '*.tsx'],
languageOptions: {
globals: { ...globals.browser, ...globals.node },
parserOptions: {
Expand All @@ -20,14 +21,14 @@ export const react = [
plugins: {
react: pluginReact,
'react-hooks': pluginReactHook,
'jsx-a11y': pluginJsxA11y,
},
rules: {
...pluginReact.configs.recommended.rules,
...pluginReact.configs['jsx-runtime'].rules,
...pluginReactHook.configs.recommended.rules,
'react/react-in-jsx-scope': 'off',
'react/jsx-uses-react': 'off',
'react/jsx-filename-extension': [1, { extensions: ['.jsx', '.tsx'] }],
},
},
];

0 comments on commit 55338ee

Please sign in to comment.