Skip to content

Commit 7635923

Browse files
authored
Merge pull request #38 from dargaCode/yarn
Yarn and linting
2 parents c6193af + 13964ed commit 7635923

27 files changed

+22515
-24361
lines changed

.eslintrc.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,17 @@ module.exports = {
99
"plugin:css-modules/recommended",
1010
"plugin:jest/style",
1111
"plugin:jest/recommended",
12+
"plugin:json/recommended",
13+
"plugin:markdown/recommended",
14+
"plugin:promise/recommended",
15+
"plugin:security/recommended",
16+
"plugin:storybook/recommended",
1217
"plugin:@typescript-eslint/recommended",
1318
"plugin:@typescript-eslint/recommended-requiring-type-checking", // slower but more powerful
1419
"prettier/@typescript-eslint", // disable eslint rules which conflict with prettier
1520
"plugin:prettier/recommended" // enables eslint-plugin-prettier and eslint-config-prettier. this will display prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array.
1621
],
17-
plugins: ["react", "css-modules", "prettier", "spellcheck"],
22+
plugins: ["react", "css-modules", "prettier", "promise", "spellcheck"],
1823
parser: "@typescript-eslint/parser",
1924
parserOptions: {
2025
ecmaVersion: 2018,
@@ -54,6 +59,10 @@ module.exports = {
5459
"react/require-default-props": [2, { forbidDefaultForRequired: true }],
5560
"react/default-props-match-prop-types": [2],
5661
"react/static-property-placement": "off",
62+
/* prefer typescript rule, which doesn't cause false positives with React import */
63+
"no-use-before-define": "off",
64+
"@typescript-eslint/no-use-before-define": ["error"],
65+
"@typescript-eslint/no-loss-of-precision": "off",
5766
"no-plusplus": [2, { allowForLoopAfterthoughts: true }],
5867
"capitalized-comments": [1, "never", { ignorePattern: "TODO" }],
5968
"spellcheck/spell-checker": [

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,11 @@
33
node_modules
44
dist
55

6+
# Yarn
7+
.pnp.*
8+
.yarn/*
9+
!.yarn/patches
10+
!.yarn/plugins
11+
!.yarn/releases
12+
!.yarn/sdks
13+
!.yarn/versions

.yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs

Lines changed: 546 additions & 0 deletions
Large diffs are not rendered by default.

.yarn/plugins/@yarnpkg/plugin-typescript.cjs

Lines changed: 9 additions & 0 deletions
Large diffs are not rendered by default.

.yarn/releases/yarn-3.2.1.cjs

Lines changed: 786 additions & 0 deletions
Large diffs are not rendered by default.

.yarnrc.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
nodeLinker: node-modules
2+
3+
plugins:
4+
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
5+
spec: "@yarnpkg/plugin-interactive-tools"
6+
- path: .yarn/plugins/@yarnpkg/plugin-typescript.cjs
7+
spec: "@yarnpkg/plugin-typescript"
8+
9+
yarnPath: .yarn/releases/yarn-3.2.1.cjs
10+
11+
packageExtensions:
12+
"@storybook/addon-actions@*":
13+
dependencies:
14+
react-dom: "^16"
15+
regenerator-runtime: "*"
16+
"@storybook/addon-knobs@*":
17+
dependencies:
18+
react-dom: "^16"
19+
regenerator-runtime: "*"
20+
"@storybook/addons@*":
21+
dependencies:
22+
regenerator-runtime: "*"
23+
"@storybook/api@*":
24+
dependencies:
25+
react-dom: "^16"
26+
"react-dev-utils@*":
27+
dependencies:
28+
typescript: "*"
29+
webpack: "^4"
30+
"react-docgen-typescript-loader@*":
31+
dependencies:
32+
webpack: "^4"

jest.config.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
module.exports = {
2+
testEnvironment: "jest-environment-jsdom",
3+
testEnvironmentOptions: {},
24
testMatch: ["**/?(*.)+(test.(ts|tsx))"],
35
setupFilesAfterEnv: ["<rootDir>/.jest/setupTests.ts"],
46
moduleNameMapper: {

0 commit comments

Comments
 (0)