Skip to content
This repository has been archived by the owner on Jul 2, 2024. It is now read-only.

Commit

Permalink
Introduce check-file plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
SupaJoon committed Oct 18, 2023
1 parent b430b32 commit b1ba409
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
},
{
ignoreMiddleExtensions: true,
},
],
},
overrides: [
// For React Typescript files in src.
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@
"eslint": "8.19.0",
"eslint-config-airbnb": "19.0.4",
"eslint-config-prettier": "8.8.0",
"eslint-plugin-check-file": "2.6.2",
"eslint-plugin-cypress": "^2.12.1",
"eslint-plugin-import": "2.26.0",
"eslint-plugin-jest": "27.2.1",
Expand Down
8 changes: 8 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit b1ba409

Please sign in to comment.