Skip to content

Commit 1937436

Browse files
authored
Updates (#68)
* Eslint * Prettier trailingComma * Vscode, lock * 👥 Add @kbkk as a contributor * 👥 Add @drillprop as a contributor * 👥 Add @jundymek as a contributor * Update eslint * Node 14, monitorss * Update all the things * Fix tests
1 parent c674ed1 commit 1937436

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+4688
-4407
lines changed

.all-contributorsrc

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,35 @@
130130
"contributions": [
131131
"code"
132132
]
133+
},
134+
{
135+
"login": "kbkk",
136+
"name": "Jakub Kisielewski",
137+
"avatar_url": "https://avatars.githubusercontent.com/u/6276426?v=4",
138+
"profile": "https://github.com/kbkk",
139+
"contributions": [
140+
"code"
141+
]
142+
},
143+
{
144+
"login": "drillprop",
145+
"name": "Bartosz Dryl",
146+
"avatar_url": "https://avatars.githubusercontent.com/u/51168865?v=4",
147+
"profile": "https://github.com/drillprop",
148+
"contributions": [
149+
"code"
150+
]
151+
},
152+
{
153+
"login": "jundymek",
154+
"name": "Łukasz Dymek",
155+
"avatar_url": "https://avatars.githubusercontent.com/u/24244872?v=4",
156+
"profile": "https://jundymek.com/",
157+
"contributions": [
158+
"code"
159+
]
133160
}
134161
],
135-
"contributorsPerLine": 7,
162+
"contributorsPerLine": 3,
136163
"skipCi": true
137164
}
File renamed without changes.

.eslintrc

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
{
2+
"root": true,
3+
"parser": "@typescript-eslint/parser",
4+
"parserOptions": {
5+
"sourceType": "module",
6+
"project": "tsconfig.json",
7+
"ecmaVersion": 2019
8+
},
9+
"plugins": ["functional", "@typescript-eslint"],
10+
"extends": [
11+
"prettier",
12+
"plugin:import/errors",
13+
"plugin:import/typescript",
14+
"plugin:@typescript-eslint/recommended-requiring-type-checking"
15+
],
16+
"rules": {
17+
"no-const-assign": "error",
18+
"no-param-reassign": "error",
19+
"prefer-const": "error",
20+
"no-var": "error",
21+
"require-await": "error",
22+
"import/no-anonymous-default-export": "error",
23+
"import/no-default-export": "error",
24+
"import/dynamic-import-chunkname": "error",
25+
"import/order": ["error", { "newlines-between": "always", "alphabetize": { "order": "asc" } }],
26+
"import/no-duplicates": "error",
27+
"import/no-cycle": "error",
28+
"@typescript-eslint/no-unused-vars": "off",
29+
"@typescript-eslint/no-unsafe-return": "off",
30+
"@typescript-eslint/consistent-type-imports": "error",
31+
"@typescript-eslint/no-misused-promises": "off",
32+
"functional/no-let": [
33+
"error",
34+
{
35+
"allowLocalMutation": true,
36+
"ignorePattern": "^mutable"
37+
}
38+
],
39+
"functional/prefer-readonly-type": "error",
40+
"functional/no-this-expression": "error",
41+
"functional/no-loop-statement": "error"
42+
},
43+
"overrides": [
44+
{
45+
"files": ["src/commands/**.ts"],
46+
"rules": {
47+
"import/no-default-export": 0
48+
}
49+
}
50+
]
51+
}

.github/workflows/test.yml

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,28 +10,32 @@ jobs:
1010
runs-on: ubuntu-latest
1111

1212
steps:
13-
- uses: actions/checkout@v1
13+
- uses: actions/checkout@v2
1414

15-
- name: Read .nvmrc
16-
run: echo "##[set-output name=NVMRC;]$(cat .nvmrc)"
15+
- name: Get Node.js version
1716
id: nvm
18-
- name: Use Node.js
19-
uses: actions/setup-node@v1
17+
run: echo ::set-output name=NVMRC::$(cat .nvmrc)
18+
19+
- name: Setup Node.js
20+
uses: actions/setup-node@v2
2021
with:
21-
node-version: '${{ steps.nvm.outputs.NVMRC }}'
22+
node-version: ${{ steps.nvm.outputs.NVMRC }}
23+
24+
- name: Get yarn cache directory path
25+
id: yarn-cache-dir-path
26+
run: echo "::set-output name=dir::$(yarn cache dir)"
2227

23-
- name: Cache Node.js modules
24-
uses: actions/cache@v1
28+
- uses: actions/cache@v2
29+
id: yarn-cache
2530
with:
26-
path: ~/.npm
27-
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }}
31+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
32+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
2833
restore-keys: |
29-
${{ runner.OS }}-node-
30-
${{ runner.OS }}-
34+
${{ runner.os }}-yarn-
3135
32-
- name: npm install, and test
36+
- name: install, and test
3337
run: |
34-
npm ci
35-
npm run test:ci
38+
yarn --frozen-lockfile
39+
yarn test:ci
3640
env:
3741
CI: true

.gitignore

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
node_modules
22
.tmp
33
.idea
4-
.idea/
54
.DS_Store
6-
.env
75
.version
86
dist
9-
.vscode
107
.history
118

129
# Logs
@@ -69,8 +66,5 @@ jspm_packages/
6966
.env
7067
.env.dev
7168

72-
yarn.lock
73-
69+
package-lock.json
7470
*.tsbuildinfo
75-
76-
/sources

.husky/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
_

.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
yarn lint-staged

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
12
1+
14

.prettierrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"semi": true,
33
"singleQuote": true,
4-
"trailingComma": "es5",
4+
"trailingComma": "all",
55
"printWidth": 100
66
}

.vscode/settings.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"editor.formatOnSave": true,
3+
"editor.defaultFormatter": "esbenp.prettier-vscode",
4+
"typescript.tsdk": "node_modules/typescript/lib",
5+
"eslint.packageManager": "yarn",
6+
"eslint.run": "onSave",
7+
"editor.codeActionsOnSave": {
8+
// "source.fixAll": true
9+
}
10+
}

0 commit comments

Comments
 (0)