Skip to content

Commit

Permalink
turn off no-negated-condition
Browse files Browse the repository at this point in the history
  • Loading branch information
gurgunday committed Jan 19, 2024
1 parent 5e73e54 commit f1bea4e
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 3 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: CI

on:
push:
branches:
- main

pull_request:
branches:
- main

jobs:
test:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [^18, ^20]

steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm run test
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"main": "./src/index.js",
"exports": "./src/index.js",
"engines": {
"node": ">=20"
"node": ">=18"
},
"scripts": {
"test": "eslint . && prettier --check .",
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ module.exports = {
"unicorn/no-array-for-each": "error",
"unicorn/no-array-push-push": "error",
"unicorn/no-instanceof-array": "error",
"unicorn/no-negated-condition": "error",
"unicorn/no-negated-condition": "off",
"unicorn/no-static-only-class": "error",
"unicorn/no-thenable": "error",
"unicorn/no-unnecessary-await": "error",
Expand Down
2 changes: 1 addition & 1 deletion src/rules/prefer-arrow-functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const isConstructor = (node) => {
};

const containsThis = (node) => {
if (typeof node !== "object" || node === null) {
if (node == null) {
return false;
}
if (node.type === "FunctionDeclaration") {
Expand Down

0 comments on commit f1bea4e

Please sign in to comment.