Skip to content

Commit

Permalink
Revert "Remove linter (#368)" (#369)
Browse files Browse the repository at this point in the history
* Revert "Remove linter (#368)"

This reverts commit b63360e.

* resolve 4 linting errors

* Turn off unicorn/escape-case which faults if run with --fix

---------

Co-authored-by: E. Cooper <[email protected]>
  • Loading branch information
echo-bravo-yahoo and ecooper authored Sep 27, 2024
1 parent b63360e commit 8327222
Show file tree
Hide file tree
Showing 5 changed files with 601 additions and 18 deletions.
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
experiments
node_modules
57 changes: 57 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"extends": ["oclif", "plugin:prettier/recommended"],
"rules": {
"no-await-in-loop": "off",
"new-cap": "off",
"quote-props": "off",
"no-negated-condition": "off",
"no-warning-comments": "off",
"spaced-comment": "off",
"max-nested-callbacks": "off",
"no-else-return": "off",
"no-console": "off",
"no-multi-str": "off",
"no-prototype-builtins": "off",
"unicorn/escape-case": "off",
"node/no-extraneous-require": [
"error",
{
"allowModules": [
"@oclif/errors",
"expect",
"jest-mock",
"@jest/globals"
]
}
],
// we use typescript so dynamic imports are fine
"node/no-unsupported-features": "off",
"camelcase": "off"
},
"ignorePatterns": ["dist/**/*", "coverage/**/*"],
"overrides": [
{
"files": ["*.test.js", "*.spec.js", "*.test.ts"],
"rules": {
"no-unused-expressions": "off",
"node/no-missing-require": "off"
}
},
{
"files": ["*.ts"],
"parser": "@typescript-eslint/parser",
"rules": {
"lines-between-class-members": "off",
"no-use-before-define": "off",
"no-undef-init": "off"
}
}
],
"parser": "@babel/eslint-parser",
"parserOptions": {
"requireConfigFile": false
},
"env": {
"mocha": true
}
}
9 changes: 9 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,21 @@
"supports-color": "^8"
},
"devDependencies": {
"@babel/eslint-parser": "^7.17.0",
"@inquirer/testing": "^2.1.7",
"@oclif/test": "^4.0.4",
"@types/chai": "^4.3.6",
"@types/mocha": "^10.0.1",
"@types/node": "^20.6.0",
"@types/sinon": "^17.0.3",
"@types/supports-color": "^8.1.3",
"@typescript-eslint/parser": "6.7.3",
"c8": "^8.0.1",
"chai": "^4.2.0",
"eslint": "^8.10.0",
"eslint-config-oclif": "^1.5.1",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^3.4.0",
"husky": "^7.0.4",
"jest": "^29.7.0",
"mocha": "^10.2.0",
Expand Down Expand Up @@ -100,8 +106,11 @@
"build": "rm -rf dist && tsc -b",
"postpack": "rm -f oclif.manifest.json",
"prepack": "yarn build && oclif manifest",
"pretest": "yarn fixlint",
"local-test": "export $(cat .env | xargs); mocha \"test/**/*.test.{js,ts}\"",
"test": "c8 -r html mocha --forbid-only \"test/**/*.test.{js,ts}\"",
"lint": "eslint .",
"fixlint": "eslint . --fix",
"version": "oclif-dev readme && git add README.md",
"fmt": "prettier -w src"
},
Expand Down
2 changes: 1 addition & 1 deletion test/commands/eval.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ function mockQuery(api) {
.post("/", matchFqlReq(q.Now()))
.reply(200, { resource: new Date() })
.post("/", matchFqlReq(q.Paginate(q.Collections())))
.reply(200, function() {
.reply(200, function () {
const auth = this.req.headers.authorization.split(" ")[1].split(":");
expect(this.req.headers["x-fauna-shell-builtin"]).to.not.exist;
return {
Expand Down
Loading

0 comments on commit 8327222

Please sign in to comment.