Skip to content

Commit

Permalink
chore(ci-runner): adds eslint-config-airbnb
Browse files Browse the repository at this point in the history
  • Loading branch information
AriPerkkio committed Dec 12, 2020
1 parent 9b1bd42 commit 7fa424e
Show file tree
Hide file tree
Showing 21 changed files with 84 additions and 33 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/lint-eslint-config-airbnb.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# This file is auto-generated. See ci/generate-workflows.js
name: eslint-config-airbnb

on:
workflow_dispatch: # Manual triggers
workflow_run:
workflows:
- Run all plugin workflows
types:
- completed
schedule:
# Every thursday at 00:00
- cron: '0 00 * * THU'

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12.11
- run: yarn install
- run: yarn build
- run: rm -rf ./node_modules
- run: yarn install
working-directory: ./ci
- run: "yarn list | grep eslint"
working-directory: ./ci
- run: "yarn log --config ./plugin-configs/eslint-config-airbnb.config.js"
working-directory: ./ci
- run: "yarn lint --config ./plugin-configs/eslint-config-airbnb.config.js"
working-directory: ./ci
env:
CI: true
4 changes: 2 additions & 2 deletions .github/workflows/lint-eslint-core-ts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ on:
types:
- completed
schedule:
# Every thursday at 15:00
- cron: '0 15 * * THU'
# Every thursday at 16:00
- cron: '0 16 * * THU'

jobs:
lint:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint-eslint-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ on:
types:
- completed
schedule:
# Every thursday at 14:00
- cron: '0 14 * * THU'
# Every thursday at 15:00
- cron: '0 15 * * THU'

jobs:
lint:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint-eslint-plugin-cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ on:
types:
- completed
schedule:
# Every thursday at 00:00
- cron: '0 00 * * THU'
# Every thursday at 01:00
- cron: '0 01 * * THU'

jobs:
lint:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint-eslint-plugin-import.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ on:
types:
- completed
schedule:
# Every thursday at 01:00
- cron: '0 01 * * THU'
# Every thursday at 02:00
- cron: '0 02 * * THU'

jobs:
lint:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint-eslint-plugin-jest-dom.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ on:
types:
- completed
schedule:
# Every thursday at 03:00
- cron: '0 03 * * THU'
# Every thursday at 04:00
- cron: '0 04 * * THU'

jobs:
lint:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint-eslint-plugin-jest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ on:
types:
- completed
schedule:
# Every thursday at 02:00
- cron: '0 02 * * THU'
# Every thursday at 03:00
- cron: '0 03 * * THU'

jobs:
lint:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint-eslint-plugin-jsx-a11y.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ on:
types:
- completed
schedule:
# Every thursday at 04:00
- cron: '0 04 * * THU'
# Every thursday at 05:00
- cron: '0 05 * * THU'

jobs:
lint:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint-eslint-plugin-mocha.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ on:
types:
- completed
schedule:
# Every thursday at 05:00
- cron: '0 05 * * THU'
# Every thursday at 06:00
- cron: '0 06 * * THU'

jobs:
lint:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint-eslint-plugin-node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ on:
types:
- completed
schedule:
# Every thursday at 06:00
- cron: '0 06 * * THU'
# Every thursday at 07:00
- cron: '0 07 * * THU'

jobs:
lint:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint-eslint-plugin-react-hooks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ on:
types:
- completed
schedule:
# Every thursday at 08:00
- cron: '0 08 * * THU'
# Every thursday at 09:00
- cron: '0 09 * * THU'

jobs:
lint:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint-eslint-plugin-react-redux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ on:
types:
- completed
schedule:
# Every thursday at 09:00
- cron: '0 09 * * THU'
# Every thursday at 10:00
- cron: '0 10 * * THU'

jobs:
lint:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint-eslint-plugin-react.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ on:
types:
- completed
schedule:
# Every thursday at 07:00
- cron: '0 07 * * THU'
# Every thursday at 08:00
- cron: '0 08 * * THU'

jobs:
lint:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint-eslint-plugin-sonarjs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ on:
types:
- completed
schedule:
# Every thursday at 10:00
- cron: '0 10 * * THU'
# Every thursday at 11:00
- cron: '0 11 * * THU'

jobs:
lint:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint-eslint-plugin-testing-library.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ on:
types:
- completed
schedule:
# Every thursday at 11:00
- cron: '0 11 * * THU'
# Every thursday at 12:00
- cron: '0 12 * * THU'

jobs:
lint:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint-eslint-plugin-unicorn.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ on:
types:
- completed
schedule:
# Every thursday at 12:00
- cron: '0 12 * * THU'
# Every thursday at 13:00
- cron: '0 13 * * THU'

jobs:
lint:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint-typescript-eslint-eslint-plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ on:
types:
- completed
schedule:
# Every thursday at 13:00
- cron: '0 13 * * THU'
# Every thursday at 14:00
- cron: '0 14 * * THU'

jobs:
lint:
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# eslint-remote-tester

![eslint-config-airbnb](https://github.com/AriPerkkio/eslint-remote-tester/workflows/eslint-config-airbnb/badge.svg)
![eslint-plugin-cypress](https://github.com/AriPerkkio/eslint-remote-tester/workflows/eslint-plugin-cypress/badge.svg)
![eslint-plugin-import](https://github.com/AriPerkkio/eslint-remote-tester/workflows/eslint-plugin-import/badge.svg)
![eslint-plugin-jest](https://github.com/AriPerkkio/eslint-remote-tester/workflows/eslint-plugin-jest/badge.svg)
Expand Down
7 changes: 6 additions & 1 deletion ci/generate-workflows.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* eslint-configs and eslint-plugins are handled the same way here.
* Both are called plugins in this context.
*/

const fs = require('fs');
const path = require('path');
const { execSync } = require('child_process');
Expand Down Expand Up @@ -118,7 +123,7 @@ function testPlugins(plugins) {

const dependencies = Object.keys(require('./package.json').devDependencies);
const plugins = dependencies
.filter(dep => /eslint-plugin/.test(dep))
.filter(dep => /eslint-(plugin|config)/.test(dep))
.map(formatPluginName)
.sort();

Expand Down
1 change: 1 addition & 0 deletions ci/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"@typescript-eslint/eslint-plugin": "^4",
"@typescript-eslint/parser": "^4",
"eslint": "^7",
"eslint-config-airbnb": "^18",
"eslint-plugin-cypress": "^2",
"eslint-plugin-import": "^2",
"eslint-plugin-jest": "^24",
Expand Down
9 changes: 9 additions & 0 deletions ci/plugin-configs/eslint-config-airbnb.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const baseConfig = require('../base.config');

module.exports = {
...baseConfig,
eslintrc: {
...baseConfig.eslintrc,
extends: ['airbnb', 'airbnb/hooks', 'airbnb/whitespace'],
},
};

0 comments on commit 7fa424e

Please sign in to comment.