Skip to content

Commit cac1e02

Browse files
authoredJun 3, 2021
Tooling CI (IanMitchell#30)
1 parent f4b2680 commit cac1e02

21 files changed

+2386
-2567
lines changed
 

‎.eslintrc.cjs

+9-19
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,16 @@
11
module.exports = {
2+
parser: "@typescript-eslint/parser",
23
env: {
3-
es2021: true,
44
node: true,
55
},
6-
extends: ['xo', 'xo-typescript'],
7-
parser: '@typescript-eslint/parser',
8-
parserOptions: {
9-
ecmaVersion: 12,
10-
sourceType: 'module',
11-
},
12-
plugins: ['@typescript-eslint'],
6+
plugins: ["@typescript-eslint"],
7+
extends: ["xo", "xo-typescript", "prettier"],
138
rules: {
14-
// Managed by Prettier
15-
'@typescript-eslint/indent': 0,
16-
'@typescript-eslint/comma-dangle': 0,
17-
'@typescript-eslint/quotes': 0,
18-
'quote-props': 0,
19-
'operator-linebreak': 0,
20-
21-
// Too strict
22-
'@typescript-eslint/ban-types': 0,
23-
'@typescript-eslint/prefer-literal-enum-member': 0,
9+
"@typescript-eslint/ban-types": 0,
10+
"@typescript-eslint/prefer-literal-enum-member": 0,
11+
"no-eq-null": 0,
12+
"eqeqeq": ["error", "smart"],
13+
"capitalized-comments": 0,
2414
},
25-
ignorePatterns: ['**/*.js'],
15+
ignorePatterns: ["**/*.js"],
2616
};

‎.github/workflows/lint.yml

+46-19
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,60 @@
1-
name: Lint & typecheck
2-
on:
3-
- push
1+
name: Lint
2+
3+
on: [push, pull_request]
4+
45
jobs:
5-
lint:
6+
Lint:
67
runs-on: ubuntu-latest
78
steps:
8-
- name: Checkout repository
9-
uses: actions/checkout@v2
9+
- uses: actions/checkout@v2
1010

11-
- name: Setup node 15.x
12-
run: actions/setup-node@v1
11+
- name: Install Node.js 16.x
12+
uses: actions/setup-node@v2
1313
with:
14-
node-version: 15.x
14+
node-version: 16.2
1515

16-
- name: Use cached node_modules
16+
- name: Cache Dependencies
1717
uses: actions/cache@v2
1818
with:
19-
path: node_modules
20-
key: nodeModules-${{ hashFiles('**/package-lock.json') }}
19+
path: ~/.npm
20+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
2121
restore-keys: |
22-
nodeModules-
22+
${{ runner.os }}-node-
2323
24-
- name: Install dependencies
25-
run: npm ci
24+
- name: Install
2625
env:
2726
CI: true
27+
run: |
28+
npm install
29+
30+
- name: Lint
31+
run: |
32+
npm run lint
33+
34+
Formatting:
35+
runs-on: ubuntu-latest
36+
steps:
37+
- uses: actions/checkout@v2
38+
39+
- name: Install Node.js 16.x
40+
uses: actions/setup-node@v2
41+
with:
42+
node-version: 16.2
2843

29-
- name: Lint project
30-
run: npm run lint
44+
- name: Cache Dependencies
45+
uses: actions/cache@v2
46+
with:
47+
path: ~/.npm
48+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
49+
restore-keys: |
50+
${{ runner.os }}-node-
51+
52+
- name: Install
53+
env:
54+
CI: true
55+
run: |
56+
npm install
3157
32-
- name: Typecheck project
33-
run: npm run typecheck
58+
- name: Formatting
59+
run: |
60+
npm run prettier

‎.github/workflows/sponsors.yml

+2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
name: Add Sponsor Labels
2+
23
on:
34
pull_request:
45
types: [opened]
56
issues:
67
types: [opened, edited]
8+
79
jobs:
810
build:
911
name: Label Sponsors

‎.github/workflows/typecheck.yml

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Typecheck
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
Typecheck:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
11+
- name: Install Node.js 16.x
12+
uses: actions/setup-node@v2
13+
with:
14+
node-version: 16.2
15+
16+
- name: Cache Dependencies
17+
uses: actions/cache@v2
18+
with:
19+
path: ~/.npm
20+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
21+
restore-keys: |
22+
${{ runner.os }}-node-
23+
24+
- name: Install
25+
env:
26+
CI: true
27+
run: |
28+
npm install
29+
30+
- name: Typecheck
31+
run: |
32+
npm run typecheck

‎.prettierrc

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
{
22
"quoteProps": "consistent",
3-
"useTabs": true,
4-
"semi": true,
5-
"singleQuote": true,
6-
"bracketSpacing": false,
7-
"arrowParens": "avoid"
3+
"useTabs": true
84
}

‎deschtimes.js

-55
This file was deleted.

0 commit comments

Comments
 (0)