-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
4,195 additions
and
1,383 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
module.exports = { | ||
root: true, | ||
extends: 'airbnb-base', | ||
env: { browser: true, mocha: true }, | ||
parser: '@babel/eslint-parser', | ||
parserOptions: { | ||
allowImportExportEverywhere: true, | ||
sourceType: 'module', | ||
requireConfigFile: false, | ||
}, | ||
rules: { | ||
'no-param-reassign': [2, { props: false }], | ||
'linebreak-style': ['error', 'unix'], | ||
'import/extensions': ['error', { js: 'always' }], | ||
'object-curly-newline': ['error', { | ||
ObjectExpression: { multiline: true, minProperties: 6 }, | ||
ObjectPattern: { multiline: true, minProperties: 6 }, | ||
ImportDeclaration: { multiline: true, minProperties: 6 }, | ||
ExportDeclaration: { multiline: true, minProperties: 6 }, | ||
}], | ||
'no-await-in-loop': 0, | ||
'class-methods-use-this': 0, | ||
'no-return-assign': ['error', 'except-parens'], | ||
'no-unused-expressions': 0, | ||
'chai-friendly/no-unused-expressions': 2, | ||
'no-underscore-dangle': ['error', { allowAfterThis: true }], | ||
'no-restricted-syntax': [ | ||
'error', | ||
{ | ||
selector: 'ForInStatement', | ||
message: 'for..in loops iterate over the entire prototype chain, which is virtually never what you want. Use Object.{keys,values,entries}, and iterate over the resulting array.', | ||
}, | ||
{ | ||
selector: 'LabeledStatement', | ||
message: 'Labels are a form of GOTO; using them makes code confusing and hard to maintain and understand.', | ||
}, | ||
{ | ||
selector: 'WithStatement', | ||
message: '`with` is disallowed in strict mode because it makes code impossible to predict and optimize.', | ||
}, | ||
], | ||
}, | ||
overrides: [ | ||
{ | ||
files: ['test/**/*.js'], | ||
rules: { 'no-console': 'off' }, | ||
}, | ||
], | ||
plugins: [ | ||
'chai-friendly', | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: Build | ||
on: [push] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Use Node.js 20 | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
- run: npm ci | ||
- run: npm run lint |
Oops, something went wrong.