Skip to content

Commit ec9f304

Browse files
authored
Merge pull request #496 from nttld/revamp
Big revamp
2 parents d09408f + 1f13387 commit ec9f304

File tree

18 files changed

+594
-3611
lines changed

18 files changed

+594
-3611
lines changed

.eslintignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
dist/
2-
lib/
31
node_modules/
2+
dist/

.eslintrc.json

Lines changed: 12 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,21 @@
11
{
2-
"plugins": ["@typescript-eslint"],
3-
"extends": ["plugin:github/recommended"],
2+
"extends": [
3+
"eslint:recommended",
4+
"plugin:@typescript-eslint/strict-type-checked",
5+
"plugin:@typescript-eslint/stylistic-type-checked",
6+
"prettier"
7+
],
48
"parser": "@typescript-eslint/parser",
59
"parserOptions": {
610
"ecmaVersion": 9,
711
"sourceType": "module",
8-
"project": "./tsconfig.json"
12+
"project": true
913
},
14+
"plugins": ["simple-import-sort"],
15+
"root": true,
1016
"rules": {
11-
"i18n-text/no-en": "off",
12-
"eslint-comments/no-use": "off",
13-
"import/no-namespace": "off",
14-
"no-unused-vars": "off",
15-
"@typescript-eslint/no-unused-vars": "error",
16-
"@typescript-eslint/explicit-member-accessibility": [
17-
"error",
18-
{"accessibility": "no-public"}
19-
],
20-
"@typescript-eslint/no-require-imports": "error",
21-
"@typescript-eslint/array-type": "error",
22-
"@typescript-eslint/await-thenable": "error",
23-
"@typescript-eslint/ban-ts-comment": "error",
24-
"camelcase": "off",
25-
"@typescript-eslint/consistent-type-assertions": "error",
26-
"@typescript-eslint/explicit-function-return-type": [
27-
"error",
28-
{"allowExpressions": true}
29-
],
30-
"@typescript-eslint/func-call-spacing": ["error", "never"],
31-
"@typescript-eslint/no-array-constructor": "error",
32-
"@typescript-eslint/no-empty-interface": "error",
33-
"@typescript-eslint/no-explicit-any": "error",
34-
"@typescript-eslint/no-extraneous-class": "error",
35-
"@typescript-eslint/no-for-in-array": "error",
36-
"@typescript-eslint/no-inferrable-types": "error",
37-
"@typescript-eslint/no-misused-new": "error",
38-
"@typescript-eslint/no-namespace": "error",
39-
"@typescript-eslint/no-non-null-assertion": "warn",
40-
"@typescript-eslint/no-unnecessary-qualifier": "error",
41-
"@typescript-eslint/no-unnecessary-type-assertion": "error",
42-
"@typescript-eslint/no-useless-constructor": "error",
43-
"@typescript-eslint/no-var-requires": "error",
44-
"@typescript-eslint/prefer-for-of": "warn",
45-
"@typescript-eslint/prefer-function-type": "warn",
46-
"@typescript-eslint/prefer-includes": "error",
47-
"@typescript-eslint/prefer-string-starts-ends-with": "error",
48-
"@typescript-eslint/promise-function-async": "error",
49-
"@typescript-eslint/require-array-sort-compare": "error",
50-
"@typescript-eslint/restrict-plus-operands": "error",
51-
"semi": "off",
52-
"@typescript-eslint/semi": ["error", "never"],
53-
"@typescript-eslint/type-annotation-spacing": "error",
54-
"@typescript-eslint/unbound-method": "error"
55-
},
56-
"env": {
57-
"node": true,
58-
"es6": true
17+
"@typescript-eslint/no-non-null-assertion": "off",
18+
"simple-import-sort/imports": "warn",
19+
"simple-import-sort/exports": "warn"
5920
}
6021
}

.github/dependabot.yml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,22 @@
11
version: 2
22
updates:
3-
- package-ecosystem: github-actions
3+
- package-ecosystem: npm
44
directory: /
55
schedule:
6-
interval: daily
6+
interval: weekly
7+
groups:
8+
dependencies:
9+
dependency-type: production
10+
update-types:
11+
- minor
12+
- patch
13+
dev-dependencies:
14+
dependency-type: development
15+
update-types:
16+
- minor
17+
- patch
718

8-
- package-ecosystem: npm
19+
- package-ecosystem: github-actions
920
directory: /
1021
schedule:
11-
interval: daily
22+
interval: weekly

.github/workflows/dist.yml

Lines changed: 0 additions & 37 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- uses: actions/checkout@v3
2424
- uses: actions/setup-node@v3
2525
with:
26-
node-version: 16.x
26+
node-version: 16
2727
- name: configure git
2828
run: |
2929
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"

.github/workflows/test.yml

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,31 @@ on:
44
push:
55
branches:
66
- main
7-
- 'releases/*'
7+
- "releases/*"
88

99
jobs:
10-
build:
10+
checks:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- uses: actions/checkout@v3
14+
- uses: actions/setup-node@v3
15+
with:
16+
node-version: 16
17+
cache: npm
1418
- run: npm ci
15-
- run: npm run all
19+
20+
- run: npm run lint
21+
- run: npm run build
22+
23+
- run: git diff -aw --exit-code dist/index.js
24+
1625
test-single:
1726
strategy:
1827
matrix:
1928
os: [ubuntu-latest, windows-latest, macos-latest]
2029
ndk-version: [r21e, r25b]
2130
local-cache: [true, false]
31+
2232
runs-on: ${{ matrix.os }}
2333
steps:
2434
- uses: actions/checkout@v3
@@ -27,13 +37,16 @@ jobs:
2737
with:
2838
ndk-version: ${{ matrix.ndk-version }}
2939
local-cache: ${{ matrix.local-cache }}
40+
3041
- run: ndk-build --version
3142
- run: ${{ steps.install-ndk.outputs.ndk-path }}/ndk-build --version
43+
3244
test-multiple:
3345
runs-on: ubuntu-latest
3446
strategy:
3547
matrix:
3648
local-cache: [true, false]
49+
3750
steps:
3851
- uses: actions/checkout@v3
3952
- uses: ./
@@ -43,11 +56,12 @@ jobs:
4356
add-to-path: false
4457
local-cache: ${{ matrix.local-cache }}
4558
- uses: ./
46-
id: install-ndk-23
59+
id: install-ndk-25
4760
with:
4861
ndk-version: r25b
4962
add-to-path: false
5063
local-cache: ${{ matrix.local-cache }}
51-
- run: '! which ndk-build'
64+
65+
- run: "! which ndk-build"
5266
- run: ${{ steps.install-ndk-21.outputs.ndk-path }}/ndk-build --version
53-
- run: ${{ steps.install-ndk-23.outputs.ndk-path }}/ndk-build --version
67+
- run: ${{ steps.install-ndk-25.outputs.ndk-path }}/ndk-build --version

.gitignore

Lines changed: 1 addition & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -1,99 +1 @@
1-
# Dependency directory
2-
node_modules
3-
4-
# Rest pulled from https://github.com/github/gitignore/blob/master/Node.gitignore
5-
# Logs
6-
logs
7-
*.log
8-
npm-debug.log*
9-
yarn-debug.log*
10-
yarn-error.log*
11-
lerna-debug.log*
12-
13-
# Diagnostic reports (https://nodejs.org/api/report.html)
14-
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
15-
16-
# Runtime data
17-
pids
18-
*.pid
19-
*.seed
20-
*.pid.lock
21-
22-
# Directory for instrumented libs generated by jscoverage/JSCover
23-
lib-cov
24-
25-
# Coverage directory used by tools like istanbul
26-
coverage
27-
*.lcov
28-
29-
# nyc test coverage
30-
.nyc_output
31-
32-
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
33-
.grunt
34-
35-
# Bower dependency directory (https://bower.io/)
36-
bower_components
37-
38-
# node-waf configuration
39-
.lock-wscript
40-
41-
# Compiled binary addons (https://nodejs.org/api/addons.html)
42-
build/Release
43-
44-
# Dependency directories
45-
jspm_packages/
46-
47-
# TypeScript v1 declaration files
48-
typings/
49-
50-
# TypeScript cache
51-
*.tsbuildinfo
52-
53-
# Optional npm cache directory
54-
.npm
55-
56-
# Optional eslint cache
57-
.eslintcache
58-
59-
# Optional REPL history
60-
.node_repl_history
61-
62-
# Output of 'npm pack'
63-
*.tgz
64-
65-
# Yarn Integrity file
66-
.yarn-integrity
67-
68-
# dotenv environment variables file
69-
.env
70-
.env.test
71-
72-
# parcel-bundler cache (https://parceljs.org/)
73-
.cache
74-
75-
# next.js build output
76-
.next
77-
78-
# nuxt.js build output
79-
.nuxt
80-
81-
# vuepress build output
82-
.vuepress/dist
83-
84-
# Serverless directories
85-
.serverless/
86-
87-
# FuseBox cache
88-
.fusebox/
89-
90-
# DynamoDB Local files
91-
.dynamodb/
92-
93-
# OS metadata
94-
.DS_Store
95-
Thumbs.db
96-
97-
# Ignore built ts files
98-
__tests__/runner/*
99-
lib/**/*
1+
node_modules/

.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
npm run lint && npm run build && git add dist

.prettierignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
dist/
2-
lib/
31
node_modules/
2+
dist/

.prettierrc.json

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
{
22
"printWidth": 80,
33
"tabWidth": 2,
4-
"useTabs": false,
54
"semi": false,
6-
"singleQuote": true,
7-
"trailingComma": "none",
8-
"bracketSpacing": false,
9-
"arrowParens": "avoid"
5+
"singleQuote": false,
6+
"quoteProps": "as-needed",
7+
"trailingComma": "all",
8+
"bracketSpacing": true,
9+
"bracketSameLine": false,
10+
"arrowParens": "always",
11+
"endOfLine": "lf"
1012
}

0 commit comments

Comments
 (0)