forked from getfider/fider
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tooling: tslint to eslint (getfider#930)
- Loading branch information
Showing
177 changed files
with
5,878 additions
and
4,181 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,4 @@ | ||
dist/ | ||
ssr.js | ||
node_modules/ | ||
package-lock.json |
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,30 @@ | ||
/* eslint-disable */ | ||
|
||
module.exports = { | ||
root: true, | ||
parser: "@typescript-eslint/parser", | ||
parserOptions: { | ||
ecmaFeatures: { jsx: true }, | ||
}, | ||
settings: { | ||
react: { | ||
version: "detect", | ||
}, | ||
}, | ||
extends: [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/eslint-recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:react/recommended", | ||
"plugin:prettier/recommended", | ||
], | ||
rules: { | ||
// Include .prettierrc.js rules | ||
"prettier/prettier": ["error", {}, { usePrettierrc: true }], | ||
"react/react-in-jsx-scope": "off", | ||
"react/prop-types": "off", | ||
"react/jsx-no-target-blank": ["error", { "allowReferrer": true }], | ||
"@typescript-eslint/no-explicit-any": "off", // TODO: turn this on in future | ||
"@typescript-eslint/explicit-module-boundary-types": "off" // TODO: turn this on in future | ||
}, | ||
}; |
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 |
---|---|---|
@@ -1,7 +1,8 @@ | ||
{ | ||
"semi": false, | ||
"trailingComma": "es5", | ||
"singleQuote": false, | ||
"printWidth": 200, | ||
"printWidth": 160, | ||
"tabWidth": 2, | ||
"useTabs": false | ||
} | ||
} |
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
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 |
---|---|---|
@@ -1,23 +1,23 @@ | ||
const global = (1, eval)('this'); | ||
global.global = global; | ||
global.globalThis = global; | ||
global.frames = global; | ||
global.self = global; | ||
const global = (1, eval)("this") | ||
global.global = global | ||
global.globalThis = global | ||
global.frames = global | ||
global.self = global | ||
|
||
const document = { | ||
documentElement: {}, | ||
getElementById: () => undefined | ||
getElementById: () => undefined, | ||
} | ||
|
||
const window = { | ||
document, | ||
location: { | ||
href: '' | ||
} | ||
href: "", | ||
}, | ||
} | ||
|
||
const navigator = {} | ||
|
||
global.navigator = navigator; | ||
global.window = window; | ||
global.document = document; | ||
global.navigator = navigator | ||
global.window = window | ||
global.document = document |
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 |
---|---|---|
@@ -1,17 +1,21 @@ | ||
/* eslint-disable @typescript-eslint/no-var-requires */ | ||
/* eslint-disable no-undef */ | ||
let emptyCSS = { | ||
name: 'empty-css-imports', | ||
name: "empty-css-imports", | ||
setup(build) { | ||
build.onLoad({ filter: /\.(css|scss)$/ }, () => ({ contents: '' })) | ||
build.onLoad({ filter: /\.(css|scss)$/ }, () => ({ contents: "" })) | ||
}, | ||
} | ||
|
||
require('esbuild').build({ | ||
entryPoints: ['./public/ssr.tsx'], | ||
bundle: true, | ||
define: { | ||
"process.env.NODE_ENV": `"${process.env.NODE_ENV || 'development'}"` | ||
}, | ||
inject: ['./esbuild-shim.js'], | ||
outfile: 'ssr.js', | ||
plugins: [emptyCSS], | ||
}).catch(() => process.exit(1)) | ||
require("esbuild") | ||
.build({ | ||
entryPoints: ["./public/ssr.tsx"], | ||
bundle: true, | ||
define: { | ||
"process.env.NODE_ENV": `"${process.env.NODE_ENV || "development"}"`, | ||
}, | ||
inject: ["./esbuild-shim.js"], | ||
outfile: "ssr.js", | ||
plugins: [emptyCSS], | ||
}) | ||
.catch(() => process.exit(1)) |
Oops, something went wrong.