Skip to content

Commit 69a4a06

Browse files
committed
Merge branch 'main' into typescript-strict-rules
2 parents 5411042 + 7a12423 commit 69a4a06

4 files changed

Lines changed: 44 additions & 6 deletions

File tree

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@aboutbits/eslint-config",
3-
"version": "2.2.4",
3+
"version": "2.4.0",
44
"description": "AboutBits' ESLint config presets",
55
"author": "AboutBits",
66
"license": "MIT",

ts-react.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,13 @@ module.exports = {
2424
'error',
2525
{ props: 'never', children: 'never', propElementValues: 'always' }
2626
],
27+
'react/self-closing-comp': [
28+
'error',
29+
{
30+
component: true,
31+
html: true,
32+
},
33+
],
2734
'react-hooks/rules-of-hooks': 'error',
2835
'react-hooks/exhaustive-deps': 'error',
2936
'tailwindcss/classnames-order': 'off',

ts.js

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,11 @@ module.exports = {
3030
'plugin:@typescript-eslint/stylistic-type-checked',
3131
],
3232
files: ['./**/*.{ts,tsx}']
33-
}
33+
},
34+
{
35+
extends: ['plugin:prettier/recommended'],
36+
files: ['./**/*.json'],
37+
},
3438
],
3539
rules: {
3640
'@typescript-eslint/no-unused-vars': [
@@ -44,12 +48,39 @@ module.exports = {
4448
],
4549
'@typescript-eslint/member-delimiter-style': 'off',
4650
'@typescript-eslint/explicit-function-return-type': 'off',
47-
'import/order': [
51+
'@typescript-eslint/restrict-template-expressions': [
4852
'error',
4953
{
50-
groups: ['builtin', 'external', 'unknown', 'parent', 'sibling', 'index']
54+
'allowNumber': true,
55+
'allowNullish': false,
56+
'allowBoolean': false,
57+
'allowRegExp': false,
58+
'allowNever': false,
5159
}
5260
],
61+
'import/order': [
62+
'error',
63+
{
64+
groups: [
65+
'builtin',
66+
'external',
67+
'internal',
68+
'unknown',
69+
'parent',
70+
'sibling',
71+
'index',
72+
'object',
73+
'type',
74+
],
75+
alphabetize: {
76+
order: 'asc',
77+
orderImportKind: 'asc',
78+
caseInsensitive: true,
79+
},
80+
'newlines-between': 'never',
81+
warnOnUnassignedImports: true,
82+
},
83+
],
5384
'no-console': [
5485
'error',
5586
{

0 commit comments

Comments
 (0)