Skip to content

Commit

Permalink
config adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
dimaMachina committed Nov 7, 2022
1 parent 9f0f97c commit 626eac2
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .changeset/funny-bikes-count.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@theguild/eslint-config': patch
---

config adjustments
6 changes: 2 additions & 4 deletions packages/eslint-config/src/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ const SORT_IMPORTS_GROUPS = [
// Packages.
// Things that start with a letter (or digit or underscore), or `@` followed by a letter.
'^@?\\w',
],
[
// Absolute imports and other imports such as Vue-style `@/foo`.
// Anything not matched in another group.
'^',
Expand Down Expand Up @@ -142,12 +140,12 @@ module.exports = {
'require-await': 'off',
// Disallow async functions which have no await expression
// https://typescript-eslint.io/rules/require-await/
'@typescript-eslint/require-await': 'error',
// '@typescript-eslint/require-await': 'error', // TODO: enable

'no-return-await': 'off',
// Enforce consistent returning of awaited values.
// https://typescript-eslint.io/rules/return-await/
'@typescript-eslint/return-await': 'error',
// '@typescript-eslint/return-await': 'error', // TODO: enable
},
};

Expand Down
9 changes: 9 additions & 0 deletions packages/eslint-config/src/mdx.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ module.exports = {
rules: {
'react/self-closing-comp': 'off', // TODO: false positive https://github.com/mdx-js/eslint-mdx/issues/437
'mdx/remark': 'error',
'import/no-default-export': 'off',
},
settings: {
'mdx/code-blocks': true,
Expand All @@ -39,5 +40,13 @@ module.exports = {
'no-undef': 'off',
},
},
// Disable rules that requires types information
{
files: ['*.md{,x}', '**/*.md{,x}/*'],
rules: {
'@typescript-eslint/require-await': 'off',
'@typescript-eslint/return-await': 'off',
},
},
],
};
2 changes: 1 addition & 1 deletion packages/eslint-config/src/react.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = {
ignorePattern: ['next-env.d.ts'],
ignorePatterns: ['next-env.d.ts'],
overrides: [
// Run rules only on JSX files
{
Expand Down

0 comments on commit 626eac2

Please sign in to comment.