Skip to content

Commit

Permalink
ESLint v9
Browse files Browse the repository at this point in the history
  • Loading branch information
gabro committed Jun 13, 2024
1 parent a706a99 commit 961f620
Show file tree
Hide file tree
Showing 8 changed files with 1,095 additions and 104 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: CI

on: push

jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm test
59 changes: 0 additions & 59 deletions ci/pipeline.yml

This file was deleted.

6 changes: 0 additions & 6 deletions ci/test.sh

This file was deleted.

17 changes: 0 additions & 17 deletions ci/test.yml

This file was deleted.

26 changes: 14 additions & 12 deletions lib/no-loops.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
'use strict';

module.exports = function (context) {
function reportLoopPresence(node) {
context.report(node, 'loops are not allowed', { identifier: node.name });
}
module.exports = {
create(context) {
function reportLoopPresence(node) {
context.report(node, 'loops are not allowed', { identifier: node.name });
}

return {
ForStatement: reportLoopPresence,
ForInStatement: reportLoopPresence,
WhileStatement: reportLoopPresence,
DoWhileStatement: reportLoopPresence,
ForOfStatement: reportLoopPresence
};
};
return {
ForStatement: reportLoopPresence,
ForInStatement: reportLoopPresence,
WhileStatement: reportLoopPresence,
DoWhileStatement: reportLoopPresence,
ForOfStatement: reportLoopPresence
};
}
}
Loading

0 comments on commit 961f620

Please sign in to comment.