-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: codeclimate, vscode, refactor ignore files
- Loading branch information
Showing
20 changed files
with
459 additions
and
150 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# @link https://docs.codeclimate.com/docs/default-analysis-configuration#sample-codeclimateyml | ||
|
||
version: '2' | ||
|
||
checks: | ||
argument-count: | ||
enabled: true | ||
config: | ||
threshold: 4 | ||
complex-logic: | ||
enabled: true | ||
config: | ||
threshold: 4 | ||
file-lines: | ||
enabled: true | ||
config: | ||
threshold: 300 | ||
method-complexity: | ||
enabled: true | ||
config: | ||
threshold: 5 | ||
method-count: | ||
enabled: true | ||
config: | ||
threshold: 20 | ||
method-lines: | ||
enabled: true | ||
config: | ||
threshold: 300 | ||
nested-control-flow: | ||
enabled: true | ||
config: | ||
threshold: 4 | ||
return-statements: | ||
enabled: true | ||
config: | ||
threshold: 4 | ||
similar-code: | ||
enabled: false | ||
config: | ||
threshold: 5 | ||
identical-code: | ||
enabled: false | ||
config: | ||
threshold: 5 | ||
|
||
# plugins: | ||
# eslint: | ||
# enabled: true | ||
# channel: "eslint-7" | ||
|
||
exclude_patterns: | ||
- 'docs/' | ||
- '**/node_modules/' | ||
- '**/config/' | ||
- '**/*.config.js' | ||
- '**/dist/' | ||
- '**/scripts/' | ||
- '**/__tests__/' | ||
- '**/*.test.js' | ||
- '**/*.test.jsx' | ||
- '**/*.test.ts' | ||
- '**/*.test.tsx' | ||
- '**/*.d.ts' | ||
- '**/*.seed.ts' | ||
- '**/seed.ts' | ||
- '**/.mesh/' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,78 @@ | ||
# All node_modules directories | ||
node_modules/ | ||
# All secrets | ||
**/.env | ||
**/.env.local | ||
**/.env.*.local | ||
# dependencies | ||
node_modules | ||
**/node_modules/ | ||
.pnp.* | ||
.pnp | ||
.pnpm-store | ||
|
||
# testing | ||
coverage/* | ||
cypress/screenshots/ | ||
cypress/videos/ | ||
.out/ | ||
|
||
# next.js and build directories | ||
# ... | ||
|
||
# misc | ||
.DS_Store | ||
*.pem | ||
Thumbs.db | ||
|
||
# debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
.pnpm-debug.log* | ||
**/.debug | ||
logs/ | ||
*.log | ||
.turbo/ | ||
**/.turbo/ | ||
|
||
# local env files | ||
# By default all git files | ||
.env | ||
**/.env | ||
.env.local | ||
.env.*.local | ||
|
||
# deployment platforms | ||
.vercel | ||
|
||
# cache | ||
.eslintcache | ||
**/.eslintcache | ||
.stylelintcache | ||
.cache/* | ||
**/tsconfig.tsbuildinfo | ||
|
||
# editors | ||
.idea/ | ||
.vscode/ | ||
|
||
# temp files | ||
tmp/ | ||
*.tmp | ||
|
||
# by default all git files | ||
.git/ | ||
.gitignore | ||
.gitattributes | ||
.github/ | ||
|
||
# Tools caches | ||
.cache/* | ||
tsconfig.tsbuildinfo | ||
.eslintcache | ||
# docker related | ||
.dockerignore | ||
Dockerfile | ||
docker-compose.*.yml | ||
docker-compose.yml | ||
docker/ | ||
|
||
# Used when building with nextjs (next-eslint) | ||
# allow | ||
# used when building with nextjs (next-eslint) | ||
!.eslintrc.base.json | ||
!.prettierignore | ||
!.prettierrc.js | ||
!.eslintignore | ||
|
||
# npm | ||
!.npmrc | ||
|
||
# Docker related | ||
.dockerignore | ||
Dockerfile | ||
docker-compose.*.yml | ||
docker-compose.yml | ||
docker/ | ||
|
||
# Log files | ||
logs/ | ||
*.log | ||
.turbo/ | ||
**/.turbo/ | ||
|
||
# Temp files | ||
tmp/ | ||
*.tmp | ||
|
||
# IDE related | ||
.idea/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,8 @@ | ||
strict-peer-dependencies=false | ||
engine-strict=true | ||
|
||
### https://gist.github.com/belgattitude/838b2eba30c324f1f0033a797bab2e31#recommended-npmrc | ||
# https://pnpm.io/next/npmrc#strict-peer-dependencies | ||
strict-peer-dependencies=true | ||
# https://pnpm.io/npmrc#auto-install-peers | ||
auto-install-peers=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,26 @@ | ||
// More, about extending this config: | ||
// https://github.com/wayofdev/npm-shareable-configs/blob/master/packages/prettier-config/README.md | ||
module.exports = { | ||
...require('@wayofdev/prettier-config'), | ||
semi: false, | ||
tabWidth: 2, | ||
useTabs: false, | ||
} | ||
// @ts-check | ||
|
||
const { getPrettierConfig } = require('@wayofdev/eslint-config-custom/helpers'); | ||
|
||
const { overrides = [], ...prettierConfig } = getPrettierConfig(); | ||
|
||
/** | ||
* @type {import('prettier').Config} | ||
*/ | ||
const config = { | ||
...prettierConfig, | ||
overrides: [ | ||
...overrides, | ||
...[ | ||
{ | ||
files: '*.md', | ||
options: { | ||
singleQuote: false, | ||
quoteProps: 'preserve', | ||
}, | ||
}, | ||
], | ||
], | ||
}; | ||
|
||
module.exports = config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
.github/ | ||
.changeset/ | ||
.husky/ | ||
docker/ | ||
README.md | ||
CHANGELOG.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,47 @@ | ||
/** | ||
* Specific eslint rules for this app/package, extends the base rules | ||
* @see https://github.com/belgattitude/nextjs-monorepo-example/blob/main/docs/about-linters.md | ||
* @see https://github.com/wayofdev/next-starter-tpl/blob/master/docs/about-linters.md | ||
*/ | ||
|
||
// Workaround for https://github.com/eslint/eslint/issues/3458 (re-export of @rushstack/eslint-patch) | ||
require('@wayofdev/eslint-config-custom/patch/modern-module-resolution') | ||
|
||
const { getDefaultIgnorePatterns } = require('@wayofdev/eslint-config-custom/helpers') | ||
|
||
module.exports = { | ||
root: true, | ||
extends: ['custom'], | ||
plugins: ['import'], | ||
parserOptions: { | ||
project: ['tsconfig.json'], | ||
tsconfigRootDir: __dirname, | ||
project: 'tsconfig.json', | ||
}, | ||
ignorePatterns: [...getDefaultIgnorePatterns(), '.next', '.out'], | ||
extends: [ | ||
'@wayofdev/eslint-config-custom/typescript', | ||
'@wayofdev/eslint-config-custom/sonar', | ||
'@wayofdev/eslint-config-custom/regexp', | ||
'@wayofdev/eslint-config-custom/jest', | ||
'@wayofdev/eslint-config-custom/react', | ||
'@wayofdev/eslint-config-custom/tailwind', | ||
'@wayofdev/eslint-config-custom/rtl', | ||
// Add specific rules for nextjs | ||
'plugin:@next/next/core-web-vitals', | ||
// Apply prettier and disable incompatible rules | ||
'@wayofdev/eslint-config-custom/prettier', | ||
], | ||
rules: { | ||
// https://github.com/vercel/next.js/discussions/16832 | ||
'@next/next/no-img-element': 'off', | ||
// For the sake of example | ||
// https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/HEAD/docs/rules/anchor-is-valid.md | ||
'jsx-a11y/anchor-is-valid': 'off', | ||
}, | ||
overrides: [ | ||
{ | ||
files: ['**/*.js'], | ||
extends: ['@wayofdev/eslint-config/'], | ||
files: ['src/pages/\\_*.{ts,tsx}'], | ||
rules: { | ||
'react/display-name': 'off', | ||
}, | ||
}, | ||
], | ||
rules: { | ||
'import/extensions': 'off', | ||
}, | ||
ignorePatterns: ['dist/**', '.next/**'], | ||
} |
Oops, something went wrong.