diff options
author | Kristóf Marussy <kristof@marussy.com> | 2022-01-27 00:17:22 +0100 |
---|---|---|
committer | Kristóf Marussy <kristof@marussy.com> | 2022-02-08 21:43:17 +0100 |
commit | 9546dc2aa39ab096ccc723786e718a739d0bdaf9 (patch) | |
tree | 9c3afc6155cc59f6dd1235397230aaa15a5f8cec /.eslintrc.cjs | |
parent | refactor: Apply shared store patches in batches (diff) | |
download | sophie-9546dc2aa39ab096ccc723786e718a739d0bdaf9.tar.gz sophie-9546dc2aa39ab096ccc723786e718a739d0bdaf9.tar.zst sophie-9546dc2aa39ab096ccc723786e718a739d0bdaf9.zip |
refactor: Coding conventions
Make sure that files have a default import with the same name as the
file whenever possible to reduce surprise.
Also shuffles around some file names for better legibility.
Signed-off-by: Kristóf Marussy <kristof@marussy.com>
Diffstat (limited to '.eslintrc.cjs')
-rw-r--r-- | .eslintrc.cjs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 5587ea7..55a055d 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs | |||
@@ -44,6 +44,8 @@ module.exports = { | |||
44 | }, | 44 | }, |
45 | }, | 45 | }, |
46 | rules: { | 46 | rules: { |
47 | // TODO Flip this to `ignorePackages` once we are on `nodenext` resolution. | ||
48 | 'import/extensions': ['error', 'never'], | ||
47 | 'import/no-unresolved': 'error', | 49 | 'import/no-unresolved': 'error', |
48 | 'import/order': [ | 50 | 'import/order': [ |
49 | 'error', | 51 | 'error', |
@@ -66,6 +68,13 @@ module.exports = { | |||
66 | ], | 68 | ], |
67 | // Airbnb prefers forEach. | 69 | // Airbnb prefers forEach. |
68 | 'unicorn/no-array-for-each': 'off', | 70 | 'unicorn/no-array-for-each': 'off', |
71 | // Typescript requires exlicit `undefined` arguments. | ||
72 | 'unicorn/no-useless-undefined': [ | ||
73 | 'error', | ||
74 | { | ||
75 | checkArguments: false, | ||
76 | }, | ||
77 | ], | ||
69 | // Common abbreviations are known and readable. | 78 | // Common abbreviations are known and readable. |
70 | 'unicorn/prevent-abbreviations': 'off', | 79 | 'unicorn/prevent-abbreviations': 'off', |
71 | }, | 80 | }, |