Skip to content

Commit

Permalink
fix(next): ajustes no config do next
Browse files Browse the repository at this point in the history
  • Loading branch information
andrefelipeschulle committed Jun 27, 2024
1 parent c8dffee commit 39112ad
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 4 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export default createConfig({
node: true,
typescript: true,
react: true,
next: true,
},
});
```
Expand All @@ -50,6 +51,8 @@ export default [
...presets.node,
// using react config
...presets.react,
// using react config
...presets.next,
];
```

Expand Down
2 changes: 1 addition & 1 deletion eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import { presets } from './dist/index.js';

export default [...presets.base, ...presets.typescript];
export default [...presets.base, ...presets.typescript,...presets.react, ...presets.next];
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@brainylab/eslint-config",
"version": "2.5.0",
"version": "2.5.1",
"description": "ESLint config for BrainyLab projects",
"keywords": [
"eslint",
Expand Down
2 changes: 1 addition & 1 deletion src/create-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export function createConfig(params: ConfigParams): FlatESLintConfig[] {
configs.push(...node);
}

if (params.presets?.react) {
if (params.presets?.react || params.presets?.next) {
configs.push(...react);
}

Expand Down
2 changes: 1 addition & 1 deletion src/presets/next.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const next = [
},
rules: {
...pluginNext.configs.recommended.rules,
'react/no-unknown-property': ['error', { ignore: ['tw'] }],
'@next/next/no-html-link-for-pages': 'off',
},
},
];
1 change: 1 addition & 0 deletions src/presets/react.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export const react = [
'react/react-in-jsx-scope': 'off',
'react/jsx-uses-react': 'off',
'react/jsx-filename-extension': [1, { extensions: ['.jsx', '.tsx'] }],
'react/no-unknown-property': ['error', { ignore: ['tw'] }],
},
},
];

0 comments on commit 39112ad

Please sign in to comment.