Skip to content

Commit 4d2a73b

Browse files
committed
chore: dependencies update and apply luma-style-guide
1 parent 798bfa2 commit 4d2a73b

22 files changed

+25167
-8915
lines changed

.eslintrc.js

Lines changed: 6 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -1,103 +1,9 @@
1-
const path = require('path');
1+
const configureBase = require('@luma-dev/eslint-config-base/configure');
22

3-
/** @type import("eslint").parserOptions */
4-
module.exports = {
5-
ignorePatterns: [],
6-
7-
overrides: [
8-
{
9-
files: '*.json',
10-
plugins: ['json-format'],
11-
12-
settings: {
13-
'json/json-with-comments-files': [],
14-
},
15-
},
16-
{
17-
files: '*.js',
18-
19-
extends: [
20-
'airbnb-base',
21-
],
3+
const config = { __dirname };
224

23-
env: {
24-
commonjs: true,
25-
},
26-
},
27-
{
28-
files: '*.ts',
29-
30-
parserOptions: { project: path.resolve(__dirname, 'tsconfig.json') },
31-
32-
extends: [
33-
'airbnb-base-typescript-prettier',
34-
'plugin:eslint-comments/recommended',
35-
// 'plugin:jest/recommended',
36-
],
37-
plugins: [
38-
'eslint-comments',
39-
// 'jest',
40-
],
41-
42-
rules: {
43-
'@typescript-eslint/no-unused-vars': ['error', {
44-
argsIgnorePattern: '^_|^\\$$',
45-
}],
46-
'no-underscore-dangle': 'off',
47-
'import/prefer-deafult-export': 'off',
48-
'no-console': 'off',
49-
'@typescript-eslint/explicit-module-boundary-types': 'off',
50-
'@typescript-eslint/no-floating-promises': 'error',
51-
'no-lone-blocks': 'off',
52-
'no-void': ['error', { allowAsStatement: true }],
53-
'@typescript-eslint/no-implicit-any-catch': 'error',
54-
'consistent-return': 'off',
55-
'global-require': 'off',
56-
'eslint-comments/no-unused-disable': 'error',
57-
'import/extensions': 'off',
58-
'@typescript-eslint/no-unnecessary-condition': ['error', {
59-
allowConstantLoopConditions: true,
60-
}],
61-
'@typescript-eslint/no-unsafe-return': 'error',
62-
'import/prefer-default-export': 'off',
63-
'import/no-unresolved': ['error', {
64-
ignore: [
65-
// coc.nvim is injected at runtime
66-
'coc.nvim',
67-
],
68-
}],
69-
},
70-
},
71-
{
72-
// test files
73-
files: [
74-
'tests/**/*.ts',
75-
'*.test.ts',
76-
'*.spec.ts',
77-
],
78-
plugins: ['jest'],
79-
},
80-
{
81-
// dev ts files
82-
files: [
83-
'tests/**/*.ts',
84-
'scripts/**/*.ts',
85-
'*.test.ts',
86-
'*.spec.ts',
87-
],
88-
rules: {
89-
'import/no-extraneous-dependencies': 'off',
90-
'@typescript-eslint/no-unsafe-return': 'off',
91-
'@typescript-eslint/no-explicit-any': 'off',
92-
'@typescript-eslint/no-var-requires': 'off',
93-
'import/no-dynamic-require': 'off',
94-
},
95-
},
96-
{
97-
files: ['*.js'],
98-
rules: {
99-
'import/order': 'off',
100-
},
101-
},
102-
],
5+
/** @type {import('eslint').Linter.Config} */
6+
module.exports = {
7+
extends: ['@luma-dev/base', '@luma-dev/jest'],
8+
overrides: [...configureBase(config)],
1039
};

.github/workflows/ci.yml

Lines changed: 48 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,26 @@ on:
1515
- alpha
1616

1717
jobs:
18+
cache-pnpm:
19+
name: Cache Pnpm
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@v2
23+
- name: Cache pnpm modules
24+
uses: actions/cache@v2
25+
with:
26+
path: ~/.pnpm-store
27+
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
28+
restore-keys: |
29+
${{ runner.os }}-
30+
- uses: pnpm/action-setup@v2
31+
with:
32+
version: 6
33+
run_install: |
34+
- recursive: true
35+
args: [--frozen-lockfile, --prefer-offline]
1836
test:
37+
needs: cache-pnpm
1938
name: Test
2039
runs-on: ubuntu-latest
2140
strategy:
@@ -27,44 +46,48 @@ jobs:
2746
- uses: actions/setup-node@v2
2847
with:
2948
node-version: ${{ matrix.node-version }}
30-
- name: Get yarn cache directory path
31-
id: yarn-cache-dir-path
32-
run: echo "::set-output name=dir::$(yarn cache dir)"
33-
- uses: actions/cache@v2
34-
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
49+
- name: Cache pnpm modules
50+
uses: actions/cache@v2
3551
with:
36-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
37-
key: ${{ runner.os }}-${{ matrix.node-version }}-yarn-${{ hashFiles('**/yarn.lock') }}
52+
path: ~/.pnpm-store
53+
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
3854
restore-keys: |
39-
${{ runner.os }}-yarn-
40-
- run: yarn install --frozen-lockfile
41-
- run: yarn ts-node-run ./scripts/md-to-package-json.ts --exit-code
42-
- run: yarn lint
43-
- run: yarn typecheck
44-
- run: yarn coverage
55+
${{ runner.os }}-
56+
- uses: pnpm/action-setup@v2
57+
with:
58+
version: 6
59+
run_install: |
60+
- recursive: true
61+
args: [--frozen-lockfile, --prefer-offline]
62+
- run: pnpm run ts-node-run ./scripts/md-to-package-json.ts --exit-code
63+
- run: pnpm run lint
64+
- run: pnpm run typecheck
65+
- run: pnpm run coverage
4566
- uses: codecov/codecov-action@v1
46-
- run: yarn build
67+
- run: pnpm run build
4768
release:
48-
needs: [test]
69+
needs: test
4970
name: Release
5071
runs-on: ubuntu-latest
5172
steps:
5273
- uses: actions/checkout@v2
5374
- uses: actions/setup-node@v2
5475
with:
5576
node-version: 14
56-
- name: Get yarn cache directory path
57-
id: yarn-cache-dir-path
58-
run: echo "::set-output name=dir::$(yarn cache dir)"
59-
- uses: actions/cache@v2
60-
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
77+
- name: Cache pnpm modules
78+
uses: actions/cache@v2
6179
with:
62-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
63-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
80+
path: ~/.pnpm-store
81+
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
6482
restore-keys: |
65-
${{ runner.os }}-yarn-
66-
- run: yarn install --frozen-lockfile
67-
- run: yarn build
83+
${{ runner.os }}-
84+
- uses: pnpm/action-setup@v2
85+
with:
86+
version: 6
87+
run_install: |
88+
- recursive: true
89+
args: [--frozen-lockfile, --prefer-offline]
90+
- run: pnpm run build
6891
- run: npx semantic-release
6992
env:
7093
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.npmrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
engine-strict=false
2+
strict-peer-dependencies=true
3+
public-hoist-pattern[]=*types*
4+
shamefully-hoist=false
5+
save-prefix=^

0 commit comments

Comments
 (0)