Skip to content

Commit caef0ed

Browse files
cameron-martinJens-G
authored andcommitted
THRIFT-5811: Update eslint & prettier
Client: js Patch: Cameron Martin This closes #3087
1 parent 951bb18 commit caef0ed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+4880
-4570
lines changed

.eslintignore

Lines changed: 0 additions & 9 deletions
This file was deleted.

.eslintrc.json

Lines changed: 0 additions & 24 deletions
This file was deleted.

eslint.config.mjs

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
import globals from "globals";
2+
import js from "@eslint/js";
3+
import eslintPluginPrettierRecommended from "eslint-plugin-prettier/recommended";
4+
5+
export default [
6+
{
7+
ignores: [
8+
// TODO: Use eslint on js lib and generated code
9+
10+
// Ignore lib/js for now, which uses jshint currently
11+
"lib/js/*",
12+
// Ignore all generated code for now
13+
"**/gen-*/",
14+
15+
// Don't lint nested node_modules
16+
"**/node_modules/",
17+
],
18+
},
19+
js.configs.recommended,
20+
eslintPluginPrettierRecommended,
21+
{
22+
languageOptions: {
23+
globals: {
24+
...globals.node,
25+
},
26+
27+
ecmaVersion: 2017,
28+
sourceType: "commonjs",
29+
},
30+
31+
rules: {
32+
"no-console": "off",
33+
"no-var": "error",
34+
"prefer-const": "error",
35+
36+
"no-constant-condition": [
37+
"error",
38+
{
39+
checkLoops: false,
40+
},
41+
],
42+
},
43+
},
44+
];

0 commit comments

Comments
 (0)