Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ module.exports = {
jest: true
},
rules: {
'no-proto': 0,
strict: 0,
'max-len': 0,
'no-proto': 0
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Disabling the no-proto rule is generally discouraged. The __proto__ property is a legacy feature that has been deprecated. It's recommended to use Object.getPrototypeOf and Object.create instead. Unless there is a strong reason to use __proto__, it's best to remove this rule override to maintain code quality and security.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's generally not recommended to disable the no-proto rule. The __proto__ property is a deprecated feature and its use can lead to fragile code. For manipulating prototypes, it's better to use the standard methods Object.getPrototypeOf() and Object.setPrototypeOf().

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Disabling the no-proto rule isn't necessary for this task, as neither the function nor the tests use the __proto__ property. It is generally better to leave this rule enabled to prevent the use of a deprecated feature unless it's explicitly required.

},
plugins: ['jest']
};
23 changes: 23 additions & 0 deletions .github/workflows/test.yml-template
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Test

on:
pull_request:
branches: [ master ]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [20.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm test
Loading