Skip to content

Commit 5f606d8

Browse files
committed
#305: eslint
1 parent 76f2427 commit 5f606d8

File tree

2 files changed

+44
-0
lines changed

2 files changed

+44
-0
lines changed

.github/workflows/eslint.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2015-2025 Yegor Bugayenko
2+
# SPDX-License-Identifier: MIT
3+
---
4+
# yamllint disable rule:line-length
5+
name: eslint
6+
'on':
7+
push:
8+
branches:
9+
- master
10+
pull_request:
11+
branches:
12+
- master
13+
jobs:
14+
eslint:
15+
timeout-minutes: 15
16+
runs-on: ubuntu-24.04
17+
steps:
18+
- uses: actions/checkout@v4
19+
- run: npm install -g eslint@9.17.0
20+
- run: npm install @eslint/js
21+
- run: eslint

eslint.config.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/*
2+
* SPDX-FileCopyrightText: Copyright (c) 2015-2025 Yegor Bugayenko
3+
* SPDX-License-Identifier: MIT
4+
*/
5+
6+
const { configs } = require('@eslint/js');
7+
8+
module.exports = [
9+
{
10+
...configs.all,
11+
files: ['**/*.js'],
12+
ignores: ['node_modules/'],
13+
languageOptions: {
14+
ecmaVersion: 2019,
15+
sourceType: 'module'
16+
},
17+
rules: {
18+
...configs.all.rules,
19+
'indent': ['error', 2],
20+
'max-len': ['error', { code: 200 }]
21+
}
22+
}
23+
];

0 commit comments

Comments
 (0)