-
-
Notifications
You must be signed in to change notification settings - Fork 738
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: update eslint config, prettier config, add jsdoc plugin (#2090)
- Loading branch information
Showing
275 changed files
with
3,398 additions
and
3,166 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,49 @@ | ||
/* eslint-env node */ | ||
// @ts-check | ||
|
||
/** @type {import("eslint").Linter.Config} */ | ||
const config = { | ||
parser: "@typescript-eslint/parser", | ||
ignorePatterns: ["**/*.css.d.ts", "dist", "build"], | ||
plugins: ["@typescript-eslint", "jest"], | ||
extends: [ | ||
"plugin:jest/recommended", | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:react-hooks/recommended", | ||
"prettier", | ||
"plugin:prettier/recommended", | ||
"plugin:import/recommended", | ||
"plugin:import/typescript" | ||
], | ||
settings: { | ||
"import/parsers": { | ||
"@typescript-eslint/parser": [".ts", ".tsx"] | ||
} | ||
}, | ||
rules: { | ||
"import/no-unresolved": "off", | ||
"prettier/prettier": "warn", | ||
"no-console": "warn", | ||
"@typescript-eslint/no-unused-vars": "warn", | ||
"@typescript-eslint/no-empty-interface": "warn", | ||
"@typescript-eslint/no-explicit-any": "warn" | ||
}, | ||
overrides: [ | ||
{ | ||
files: ["**/?(*.)+(spec|test).[jt]s?(x)"], | ||
env: { | ||
jest: true | ||
}, | ||
extends: ["plugin:jest/recommended", "plugin:testing-library/react"], | ||
rules: { | ||
"testing-library/no-render-in-setup": "off", | ||
"testing-library/no-node-access": "off", | ||
"testing-library/render-result-naming-convention": "off", | ||
"testing-library/no-render-in-lifecycle": "off" | ||
} | ||
} | ||
] | ||
}; | ||
|
||
module.exports = config; |
This file was deleted.
Oops, something went wrong.
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 @@ | ||
ignore-workspace-root-check=true |
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,6 +1,11 @@ | ||
{ | ||
"trailingComma": "none", | ||
"$schema": "https://json.schemastore.org/prettierrc", | ||
"tabWidth": 2, | ||
"useTabs": false, | ||
"semi": true, | ||
"singleQuote": true | ||
"singleQuote": false, | ||
"trailingComma": "none", | ||
"plugins": [ | ||
"prettier-plugin-jsdoc" | ||
] | ||
} |
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,18 +1,18 @@ | ||
import type { Config } from '@jest/types'; | ||
import type { Config } from "@jest/types"; | ||
|
||
const config: Config.InitialOptions = { | ||
preset: 'ts-jest', | ||
roots: ['./src'], | ||
preset: "ts-jest", | ||
roots: ["./src"], | ||
moduleNameMapper: { | ||
'^test/(.*)': ['<rootDir>/test/$1'], | ||
'^components(.*)': ['<rootDir>/src/components$1'], | ||
'^contexts(.*)': ['<rootDir>/src/contexts$1'], | ||
'^hooks(.*)': ['<rootDir>/src/hooks$1'], | ||
'^types(.*)': ['<rootDir>/src/types$1'] | ||
"^test/(.*)": ["<rootDir>/test/$1"], | ||
"^components(.*)": ["<rootDir>/src/components$1"], | ||
"^contexts(.*)": ["<rootDir>/src/contexts$1"], | ||
"^hooks(.*)": ["<rootDir>/src/hooks$1"], | ||
"^types(.*)": ["<rootDir>/src/types$1"] | ||
}, | ||
testEnvironment: 'jsdom', | ||
coverageReporters: ['lcov', 'text', 'clover'], | ||
setupFilesAfterEnv: ['./test/setup.ts'] | ||
testEnvironment: "jsdom", | ||
coverageReporters: ["lcov", "text", "clover"], | ||
setupFilesAfterEnv: ["./test/setup.ts"] | ||
}; | ||
|
||
export default 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
Oops, something went wrong.