@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.
@@ -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: 'npm'
5
- directory: '/'
6
- schedule:
7
- interval: 'monthly'
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@v2
8
+ - name: Checkout ๐Ÿ›Ž๏ธ
9
+ uses: actions/checkout@v4
10
10
  with:
11
11
  persist-credentials: false
12
12
 
13
- - name: Build
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 ci
16
- npm test
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
- 14.16.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.3.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
- "chalk": "^4.1.1",
37
- "deepmerge": "^4.2.2",
38
- "eslint": "^7.26.0",
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": ">=7.0.0",
44
- "eslint-plugin-react": ">=7.12.4",
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
- eslint = new ESLint({
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
- // Show error report
34
- ESLint.getErrorResults(results).forEach((error) => {
35
- errorCount += error.errorCount;
36
- warningCount += error.warningCount;
37
- error.messages.forEach((message) =>
38
- console.error(
39
- chalk.red(message.message),
40
- chalk.white(`(${message.ruleId})`),
41
- chalk.white(`\n\t${error.filePath}:${message.line}:${message.column}`)
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);