Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update eslint config #80

Merged
Merged
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
31 changes: 0 additions & 31 deletions .eslintrc

This file was deleted.

45 changes: 45 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
module.exports = {
root: true,
parser: "@babel/eslint-parser",
Akirtovskis marked this conversation as resolved.
Show resolved Hide resolved
plugins: ["eslint-plugin-prettier"],
Copy link
Contributor

Choose a reason for hiding this comment

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

do we want to apply prettier to the flow files or just the typescript ones?

env: {
es6: true,
node: true,
commonjs: true,
},
parserOptions: {
Copy link
Contributor

Choose a reason for hiding this comment

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

should this go inside the overrides section?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There have to be both parser options, otherwise pipeline fail with some config error related to that.

tsconfigRootDir: __dirname,
ecmaVersion: 2020,
sourceType: "module",
project: ["./tsconfig.json"], // Specify it only for TypeScript files
},
overrides: [
{
files: ["*.ts", "*.tsx"], // Your TypeScript files extension
extends: ["@stacks/eslint-config"],
},
],
rules: {
"comma-dangle": ["error", "never"],
quotes: [2, "single"],
"eol-last": 2,
"no-debugger": 1,

noMixedRequires: 0,
noUnderscoreDangle: 0,
noMultiSpaces: 0,
noTrailingSpaces: 0,
noExtraBooleanCast: 0,
"no-undef": 2,
"no-unused-vars": 2,
"no-var": 2,
noParamReassign: 0,
noElseReturn: 0,
noConsole: 0,
"prefer-const": 2,
newCap: 0,
camelCase: 0,
semi: [2, "never"],
"valid-jsdoc": ["error"],
},
};
4 changes: 3 additions & 1 deletion .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
.*/node_modules/documentation/*
.*/node_modules/.staging/*
.*/node_modules/npm/*

.*/node_modules/eslint-import-resolver-node/node_modules*
.*/node_modules/eslint-import-resolver-typescript/node_modules*
.*/node_modules/eslint-plugin-import/node_modules*
[include]

[libs]
Expand Down
Loading