Skip to content

Commit 359f3c9

Browse files
committed
chore: upgrading project to latest ARC standard
1 parent 38c60ed commit 359f3c9

16 files changed

+5480
-4263
lines changed

.eslintignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
coverage/
2+
_site/
3+
dist/

.eslintrc.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
extends: ['@advanced-rest-client/eslint-config'].map(require.resolve),
3+
};

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
# General
32
.DS_Store
43
.AppleDouble
@@ -56,5 +55,4 @@ $RECYCLE.BIN/
5655
.nfs*
5756

5857
node_modules
59-
build
6058
coverage

.npmignore

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
coverage/
22
test/
3+
demo/
34
gen-tsd.json
45
CONTRIBUTING.md
5-
demo/
66
.travis.yml
77
index.html
88
polymer.json
99
karma.*
10+
husky.*
11+
commitlint.*
12+
.*
13+
*.config.*
14+
prettier.config.js

commitlint.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
extends: ['@commitlint/config-conventional']
3+
};

gen-tsd.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,12 @@
22
"excludeFiles": [
33
"demo/*",
44
"test/*",
5-
"index.html",
6-
"karma.*"
5+
"coverage/*",
6+
"karma.*",
7+
"prettier.config.js",
8+
"husky.config.js",
9+
"commitlint.config.js",
10+
"prettier.config.js",
11+
".*"
712
]
813
}

husky.config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = {
2+
hooks: {
3+
'pre-commit': 'lint-staged',
4+
'commit-msg': 'commitlint -E HUSKY_GIT_PARAMS'
5+
}
6+
};

index.html

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

karma.conf.js

Lines changed: 29 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* eslint-disable import/no-extraneous-dependencies */
2-
const createDefaultConfig = require('@open-wc/testing-karma/default-config');
3-
const merge = require('webpack-merge');
2+
const { createDefaultConfig } = require('@open-wc/testing-karma');
3+
const merge = require('deepmerge');
44

55
module.exports = (config) => {
66
config.set(
@@ -11,20 +11,35 @@ module.exports = (config) => {
1111
//
1212
// npm run test -- --grep test/foo/bar.test.js
1313
// npm run test -- --grep test/bar/*
14-
{ pattern: config.grep ? config.grep : 'test/**/*.test.js', type: 'module' }
14+
{
15+
pattern: config.grep ? config.grep : 'test/**/*.test.js',
16+
type: 'module'
17+
},
18+
{
19+
pattern: require.resolve('chai/chai.js')
20+
},
21+
{
22+
pattern: require.resolve('axe-core/axe.min.js')
23+
}
1524
],
1625

17-
// coverageIstanbulReporter: {
18-
// thresholds: {
19-
// global: {
20-
// statements: 80,
21-
// branches: 78,
22-
// functions: 90,
23-
// lines: 80
24-
// }
25-
// }
26-
// }
27-
}),
26+
// see the karma-esm docs for all options
27+
esm: {
28+
// if you are using 'bare module imports' you will need this option
29+
nodeResolve: true
30+
},
31+
32+
coverageIstanbulReporter: {
33+
thresholds: {
34+
global: {
35+
statements: 80,
36+
branches: 80,
37+
functions: 90,
38+
lines: 80
39+
}
40+
}
41+
},
42+
})
2843
);
2944
return config;
3045
};

karma.sl.config.js

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,18 @@
11
/* eslint-disable import/no-extraneous-dependencies */
2-
const merge = require('webpack-merge');
2+
const merge = require('deepmerge');
33
const slSettings = require('@advanced-rest-client/testing-karma-sl/sl-settings.js');
44
const createBaseConfig = require('./karma.conf.js');
55

66
module.exports = (config) => {
77
const cnf = slSettings();
8-
cnf.sauceLabs.testName = 'api-documentation-document';
8+
cnf.sauceLabs.testName = 'api-request-panel';
99
cnf.browsers = [
1010
'SL_Chrome',
1111
'SL_Chrome-1',
1212
'SL_Firefox',
1313
'SL_Firefox-1',
1414
'SL_Safari',
15-
'SL_Safari-1',
16-
// 'SL_IE_11',
17-
'SL_EDGE'
15+
// 'SL_EDGE'
1816
];
1917
if (process.env.TRAVIS) {
2018
const buildLabel = 'TRAVIS #' + process.env.TRAVIS_BUILD_NUMBER + ' (' + process.env.TRAVIS_BUILD_ID + ')';
@@ -28,9 +26,7 @@ module.exports = (config) => {
2826
cnf.sauceLabs.tunnelIdentifier = process.env.TRAVIS_JOB_NUMBER;
2927
}
3028

31-
config.set(
32-
merge(createBaseConfig(config), cnf)
33-
);
29+
config.set(merge(createBaseConfig(config), cnf));
3430

3531
return config;
3632
};

0 commit comments

Comments
 (0)