Skip to content

Commit 961f620

Browse files
committed
ESLint v9
1 parent a706a99 commit 961f620

File tree

8 files changed

+1095
-104
lines changed

8 files changed

+1095
-104
lines changed

.github/workflows/ci.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: CI
2+
3+
on: push
4+
5+
jobs:
6+
test:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- name: Checkout code
11+
uses: actions/checkout@v4
12+
- name: Set up Node.js
13+
uses: actions/setup-node@v4
14+
with:
15+
node-version: 20
16+
- name: Install dependencies
17+
run: npm ci
18+
- name: Run tests
19+
run: npm test

ci/pipeline.yml

-59
This file was deleted.

ci/test.sh

-6
This file was deleted.

ci/test.yml

-17
This file was deleted.

lib/no-loops.js

+14-12
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
'use strict';
22

3-
module.exports = function (context) {
4-
function reportLoopPresence(node) {
5-
context.report(node, 'loops are not allowed', { identifier: node.name });
6-
}
3+
module.exports = {
4+
create(context) {
5+
function reportLoopPresence(node) {
6+
context.report(node, 'loops are not allowed', { identifier: node.name });
7+
}
78

8-
return {
9-
ForStatement: reportLoopPresence,
10-
ForInStatement: reportLoopPresence,
11-
WhileStatement: reportLoopPresence,
12-
DoWhileStatement: reportLoopPresence,
13-
ForOfStatement: reportLoopPresence
14-
};
15-
};
9+
return {
10+
ForStatement: reportLoopPresence,
11+
ForInStatement: reportLoopPresence,
12+
WhileStatement: reportLoopPresence,
13+
DoWhileStatement: reportLoopPresence,
14+
ForOfStatement: reportLoopPresence
15+
};
16+
}
17+
}

0 commit comments

Comments
 (0)