Skip to content

Commit 7ef4fce

Browse files
committed
Add template files required to make eslint actually work
1 parent 1e3fcd7 commit 7ef4fce

File tree

4 files changed

+70
-9
lines changed

4 files changed

+70
-9
lines changed

templates/.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
REACT_APP_FOOBARA_GLOBAL_URL_BASE=http://localhost:9292

templates/.eslintrc.js

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
module.exports = {
2+
"env": {
3+
"browser": true,
4+
"es2021": true
5+
},
6+
"extends": [
7+
"standard-with-typescript",
8+
"plugin:react/recommended"
9+
],
10+
"overrides": [
11+
{
12+
"env": {
13+
"node": true
14+
},
15+
"files": [
16+
".eslintrc.{js,cjs}"
17+
],
18+
"parserOptions": {
19+
"sourceType": "script"
20+
}
21+
}
22+
],
23+
parser: '@typescript-eslint/parser',
24+
"parserOptions": {
25+
"ecmaVersion": "latest",
26+
project: ['./tsconfig.json'],
27+
"sourceType": "module"
28+
},
29+
"plugins": [
30+
"react"
31+
],
32+
settings: {
33+
react: {
34+
version: "detect"
35+
},
36+
},
37+
"rules": {
38+
"@typescript-eslint/explicit-function-return-type": "off",
39+
"@typescript-eslint/triple-slash-reference": "off",
40+
"@typescript-eslint/explicit-function-return-type": "off",
41+
"@typescript-eslint/no-floating-promises": "off",
42+
}
43+
}

templates/src/empty_typescript_react_project.rb.erb

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

templates/tsconfig.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"compilerOptions": {
3+
"target": "es6",
4+
"lib": [
5+
"dom",
6+
"dom.iterable",
7+
"esnext"
8+
],
9+
"allowJs": true,
10+
"skipLibCheck": true,
11+
"esModuleInterop": true,
12+
"allowSyntheticDefaultImports": true,
13+
"strict": true,
14+
"forceConsistentCasingInFileNames": true,
15+
"noFallthroughCasesInSwitch": true,
16+
"module": "CommonJS",
17+
"moduleResolution": "node",
18+
"resolveJsonModule": true,
19+
"isolatedModules": true,
20+
"noEmit": true,
21+
"jsx": "react-jsx"
22+
},
23+
"include": [
24+
"src"
25+
]
26+
}

0 commit comments

Comments
 (0)