-
Notifications
You must be signed in to change notification settings - Fork 25
EVG-20048: Introduce check-file plugin #2109
Changes from 1 commit
b1ba409
a3e406c
9889520
647483b
d54ce57
87b0510
f43cd07
4976741
bd90447
f8ea637
aa95bc4
0848548
bc5a909
90c44fe
802787e
1f66210
c1a86a6
c8d17f9
ad6d4c0
59e8c90
9034003
de7196a
827ea8e
750a352
161996b
916dcad
998cf28
1013516
8fc1528
bbece55
33f1d7b
45a7c6e
5defa1c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,7 +28,7 @@ module.exports = { | |
"plugin:jsdoc/recommended-typescript-error", | ||
"plugin:prettier/recommended", // Note: prettier must ALWAYS be the last extension. | ||
], | ||
plugins: ["@typescript-eslint", "sort-destructure-keys"], | ||
plugins: ["@typescript-eslint", "sort-destructure-keys", "check-file"], | ||
settings: { | ||
react: { | ||
version: "detect", | ||
|
@@ -96,6 +96,18 @@ module.exports = { | |
// Rules for prettier. | ||
"prettier/prettier": errorIfStrict, // Makes Prettier issues warnings rather than errors. | ||
"sort-destructure-keys/sort-destructure-keys": errorIfStrict, | ||
"check-file/filename-naming-convention": [ | ||
"warn", | ||
{ | ||
"**/*.graphql": "KEBAB_CASE", | ||
"cypress/integration/**/*.ts": "SNAKE_CASE", | ||
"scripts/**/*.{js,ts}": "KEBAB_CASE", | ||
"src/**/*.{js,ts}": "CAMEL_CASE", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You can use e.g. Checkout for an easy way to test out glob match rules. |
||
}, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we further trim these down? So we don't have 4 different conventions. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is the smallest set that makes sense to me. Let me know what you want to trim and why. |
||
{ | ||
ignoreMiddleExtensions: true, | ||
}, | ||
], | ||
}, | ||
overrides: [ | ||
// For React Typescript files in src. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8976,6 +8976,14 @@ eslint-module-utils@^2.7.3: | |
dependencies: | ||
debug "^3.2.7" | ||
|
||
[email protected]: | ||
version "2.6.2" | ||
resolved "https://registry.yarnpkg.com/eslint-plugin-check-file/-/eslint-plugin-check-file-2.6.2.tgz#2e60d567ce7d087727d19c7e7b5b9def1e5b693e" | ||
integrity sha512-z3Rur4JjOdNH0fia1IH7JQseo9NLuFVtw9j8P6z2c5XmXWemH7/qGpmMB8XbOt9bJBNpmPlNAGJty9b3EervPw== | ||
dependencies: | ||
is-glob "^4.0.3" | ||
micromatch "^4.0.5" | ||
|
||
eslint-plugin-cypress@^2.12.1: | ||
version "2.14.0" | ||
resolved "https://registry.yarnpkg.com/eslint-plugin-cypress/-/eslint-plugin-cypress-2.14.0.tgz#c65e1f592680dd25bbd00c86194ee85fecf59bd7" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use our constant.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or alternatively
errorIfStrict
is there any reason we wouldn't want to enforce files are consistently named?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about using the
WARN
flag until all of the problems are resolved and then applyerrorIfStrict
? Alternatively we can do them at once but there will be over 42 renamed files and imports.