@moccu/eslint-config 0.3.0 โ 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/dependabot.yml +15 -10
- package/.github/workflows/build.yml +26 -5
- package/.nvmrc +1 -1
- package/package.json +6 -12
- package/test/core.js +29 -30
package/.github/dependabot.yml
CHANGED
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
version: 2
|
|
2
2
|
updates:
|
|
3
|
+
- package-ecosystem: 'npm'
|
|
4
|
+
directory: '/'
|
|
5
|
+
schedule:
|
|
6
|
+
interval: 'monthly'
|
|
7
|
+
time: '05:00'
|
|
8
|
+
groups:
|
|
9
|
+
dependencies:
|
|
10
|
+
update-types:
|
|
11
|
+
- 'minor'
|
|
12
|
+
- 'patch'
|
|
3
13
|
|
|
4
|
-
- package-ecosystem: '
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
- package-ecosystem: 'github-actions'
|
|
10
|
-
directory: '/'
|
|
11
|
-
schedule:
|
|
12
|
-
interval: 'monthly'
|
|
13
|
-
|
|
14
|
+
- package-ecosystem: 'github-actions'
|
|
15
|
+
directory: '/'
|
|
16
|
+
schedule:
|
|
17
|
+
interval: 'monthly'
|
|
18
|
+
time: '05:00'
|
|
@@ -5,12 +5,33 @@ jobs:
|
|
|
5
5
|
build:
|
|
6
6
|
runs-on: ubuntu-latest
|
|
7
7
|
steps:
|
|
8
|
-
- name: Checkout
|
|
9
|
-
uses: actions/checkout@
|
|
8
|
+
- name: Checkout ๐๏ธ
|
|
9
|
+
uses: actions/checkout@v4
|
|
10
10
|
with:
|
|
11
11
|
persist-credentials: false
|
|
12
12
|
|
|
13
|
-
- name:
|
|
13
|
+
- name: Setup ๐
|
|
14
|
+
uses: actions/setup-node@v4
|
|
15
|
+
with:
|
|
16
|
+
node-version-file: '.nvmrc'
|
|
17
|
+
registry-url: https://registry.npmjs.org/
|
|
18
|
+
|
|
19
|
+
- name: Install dependencies ๐จ๐ปโ๐ป
|
|
20
|
+
run: npm ci
|
|
21
|
+
|
|
22
|
+
- name: Run tests ๐งช
|
|
23
|
+
run: npm t
|
|
24
|
+
|
|
25
|
+
- name: Publish ๐
|
|
26
|
+
if: startsWith(github.ref, 'refs/tags/')
|
|
27
|
+
run: npm publish --access public
|
|
28
|
+
env:
|
|
29
|
+
NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN}}
|
|
30
|
+
|
|
31
|
+
- name: Publish to GitHub ๐
|
|
32
|
+
if: startsWith(github.ref, 'refs/tags/')
|
|
14
33
|
run: |
|
|
15
|
-
npm
|
|
16
|
-
npm
|
|
34
|
+
npm set //npm.pkg.github.com/:_authToken $GITHUB_TOKEN
|
|
35
|
+
npm publish --access public --@moccu:registry=https://npm.pkg.github.com
|
|
36
|
+
env:
|
|
37
|
+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
package/.nvmrc
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
20.15.0
|
package/package.json
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moccu/eslint-config",
|
|
3
3
|
"description": "The eslint config we use at moccu",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.5.0",
|
|
5
5
|
"author": "Moccu GmbH & Co. KG",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": "moccu/eslint-config-moccu",
|
|
8
|
-
"engines": {
|
|
9
|
-
"node": ">=6"
|
|
10
|
-
},
|
|
11
8
|
"scripts": {
|
|
12
9
|
"test": "node test/index.js"
|
|
13
10
|
},
|
|
@@ -33,15 +30,12 @@
|
|
|
33
30
|
"hint"
|
|
34
31
|
],
|
|
35
32
|
"devDependencies": {
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"eslint": "^
|
|
39
|
-
"eslint-plugin-react": "^7.12.4",
|
|
40
|
-
"eslint-plugin-sort-class-members": "^1.4.0"
|
|
33
|
+
"eslint": "^8.35.0",
|
|
34
|
+
"eslint-plugin-react": "^7.32.2",
|
|
35
|
+
"eslint-plugin-sort-class-members": "^1.20.0"
|
|
41
36
|
},
|
|
42
37
|
"peerDependencies": {
|
|
43
|
-
"eslint": ">=
|
|
44
|
-
"eslint-plugin-
|
|
45
|
-
"eslint-plugin-sort-class-members": "^1.4.0"
|
|
38
|
+
"eslint": ">=8.0.0",
|
|
39
|
+
"eslint-plugin-sort-class-members": "^1.20.0"
|
|
46
40
|
}
|
|
47
41
|
}
|
package/test/core.js
CHANGED
|
@@ -3,26 +3,9 @@
|
|
|
3
3
|
(async function() {
|
|
4
4
|
const
|
|
5
5
|
assert = require('assert'),
|
|
6
|
-
chalk = require('chalk'),
|
|
7
|
-
deepmerge = require('deepmerge'),
|
|
8
6
|
{ESLint} = require('eslint'),
|
|
9
7
|
files = ['**/*.js'],
|
|
10
|
-
|
|
11
|
-
useEslintrc: false,
|
|
12
|
-
overrideConfig: {
|
|
13
|
-
env: {
|
|
14
|
-
'es6': true,
|
|
15
|
-
'node': true
|
|
16
|
-
},
|
|
17
|
-
parserOptions: {
|
|
18
|
-
'ecmaVersion': 9
|
|
19
|
-
},
|
|
20
|
-
...['index', 'react', 'react-proptypes'].reduce(
|
|
21
|
-
(cfg, name) => deepmerge(cfg, require('../' + name))
|
|
22
|
-
)
|
|
23
|
-
}
|
|
24
|
-
}),
|
|
25
|
-
results = await eslint.lintFiles(files)
|
|
8
|
+
configs = ['index', 'react', 'react-proptypes']
|
|
26
9
|
;
|
|
27
10
|
|
|
28
11
|
let
|
|
@@ -30,18 +13,34 @@
|
|
|
30
13
|
warningCount = 0
|
|
31
14
|
;
|
|
32
15
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
16
|
+
await Promise.all(configs.map(async (name) => {
|
|
17
|
+
const
|
|
18
|
+
config = require(`../${name}`),
|
|
19
|
+
eslint = new ESLint({
|
|
20
|
+
useEslintrc: false,
|
|
21
|
+
overrideConfig: {
|
|
22
|
+
env: {
|
|
23
|
+
'es6': true,
|
|
24
|
+
'node': true
|
|
25
|
+
},
|
|
26
|
+
parserOptions: {
|
|
27
|
+
'ecmaVersion': 'latest'
|
|
28
|
+
},
|
|
29
|
+
...config
|
|
30
|
+
}
|
|
31
|
+
}),
|
|
32
|
+
results = await eslint.lintFiles(files)
|
|
33
|
+
;
|
|
34
|
+
|
|
35
|
+
// Show error report
|
|
36
|
+
ESLint.getErrorResults(results).forEach((error) => {
|
|
37
|
+
errorCount += error.errorCount;
|
|
38
|
+
warningCount += error.warningCount;
|
|
39
|
+
error.messages.length && console.log('\n', error.filePath);
|
|
40
|
+
error.messages.forEach((message) => console.log(`${message.line}:${message.column}`, message.message, message.ruleId));
|
|
41
|
+
error.messages.length && console.log(`\n${error.errorCount} errors, ${error.warningCount} warnings\n`);
|
|
42
|
+
});
|
|
43
|
+
}));
|
|
45
44
|
|
|
46
45
|
// Self test
|
|
47
46
|
assert.equal(errorCount, 0);
|