Skip to content

Commit dc1171e

Browse files
committed
Unify CS and add CI linter
1 parent 7071e59 commit dc1171e

Some content is hidden

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

98 files changed

+39084
-38643
lines changed

.eslintrc.js

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
module.exports = {
2+
env: {
3+
browser: true,
4+
es6: true,
5+
},
6+
extends: [
7+
],
8+
parserOptions: {
9+
ecmaVersion: '2020',
10+
sourceType: 'module',
11+
},
12+
ignorePatterns: [
13+
'/dist',
14+
],
15+
rules: {
16+
indent: ['error', 4, { SwitchCase: 1 }],
17+
'key-spacing': ['error', { beforeColon: false, afterColon: true }],
18+
curly: ['error', 'all'],
19+
quotes: ['error', 'single', { avoidEscape: true }],
20+
'comma-dangle': ['error', {
21+
arrays: 'always-multiline',
22+
objects: 'always-multiline',
23+
functions: 'never',
24+
imports: 'always-multiline',
25+
exports: 'always-multiline',
26+
}],
27+
},
28+
reportUnusedDisableDirectives: true,
29+
};

.github/workflows/ci.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,19 @@
11
name: CI
2-
on: [pull_request]
2+
on: [push, pull_request]
33
permissions:
44
contents: read
55

66
jobs:
7+
lint:
8+
name: Lint
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v3
12+
- uses: actions/setup-node@v3
13+
- name: Install dependencies
14+
run: yarn
15+
- name: Lint JS files
16+
run: npm run lint
717
test:
818
name: Test build process on node ${{ matrix.node-version }}
919
runs-on: ubuntu-latest
@@ -13,13 +23,13 @@ jobs:
1323
node-version: [12, 14, 16, 18]
1424
steps:
1525
- uses: actions/checkout@v3
16-
- name: Use Node.js ${{ matrix.node-version }}
26+
- name: Setup Node.js ${{ matrix.node-version }}
1727
uses: actions/setup-node@v3
1828
with:
1929
node-version: ${{ matrix.node-version }}
2030
- name: pre-install
2131
run: sh ./scripts/preinstall.sh
22-
- name: install dependencies
32+
- name: Install dependencies
2333
run: yarn
2434
- name: pre fomantic install & gulp build
2535
run: yarn gulp install

0 commit comments

Comments
 (0)