Skip to content

Commit e0a2509

Browse files
authored
Merge pull request #390 from nikolas/github-actions
Add github actions
2 parents 95d4e1d + bec7234 commit e0a2509

File tree

7 files changed

+3471
-2671
lines changed

7 files changed

+3471
-2671
lines changed

.eslintrc.json

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

.github/workflows/nodejs.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Node.js CI
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
lint:
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
matrix:
15+
node-version: [22]
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Use Node.js ${{ matrix.node-version }}
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: ${{ matrix.node-version }}
24+
25+
- run: npm install
26+
27+
- run: make eslint

.travis.yml

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

eslint.config.js

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import js from '@eslint/js';
2+
import react from 'eslint-plugin-react';
3+
4+
export default [
5+
js.configs.recommended,
6+
{
7+
files: ['lib/**/*.js', 'lib/**/*.jsx'],
8+
languageOptions: {
9+
ecmaVersion: 2020,
10+
sourceType: 'module',
11+
parserOptions: {
12+
ecmaFeatures: {
13+
jsx: true
14+
}
15+
}
16+
},
17+
plugins: {
18+
react
19+
},
20+
rules: {
21+
'no-console': 'off',
22+
'react/jsx-uses-vars': 'error'
23+
},
24+
settings: {
25+
react: {
26+
version: 'detect'
27+
}
28+
}
29+
}
30+
];

lib/demo.jsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
/* global document */
2+
13
import React from 'react';
24
import ReactDOM from 'react-dom';
35
import MoonPhaseView from './MoonPhaseView';

lib/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
import MoonPhaseView from './MoonPhaseView';
44

5-
module.exports = MoonPhaseView;
5+
export default MoonPhaseView;

0 commit comments

Comments
 (0)