Skip to content
This repository has been archived by the owner on Nov 4, 2020. It is now read-only.

[WIP] Experiment ts 1 #53

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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
7 changes: 7 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# don't ever lint
node_modules
# don't lint build output (make sure it's set to your correct build folder name)
dist
# don't lint nyc coverage output
coverage
examples/cra/**
43 changes: 26 additions & 17 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,29 @@
module.exports = {
root: true,
env: {
browser: true,
es6: true
es6: true,
node: true,
browser: true
},
extends: ["plugin:react/recommended", "standard"],
globals: {
Atomics: "readonly",
SharedArrayBuffer: "readonly"
},
parserOptions: {
ecmaFeatures: {
jsx: true
},
ecmaVersion: 2018,
sourceType: "module"
},
plugins: ["react"],
rules: {}
};
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint', 'prettier'],
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/eslint-recommended',
'prettier',
'prettier/@typescript-eslint',
'plugin:prettier/recommended',
'plugin:react/recommended'
],
ignorePatterns: ['examples/cra/**/*'],
overrides: [
{
files: ['**/*.{js,ts,tsx}'],
rules: {
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'react/prop-types': 'off'
}
}
]
}
12 changes: 12 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"printWidth": 100,
"tabWidth": 2,
"useTabs": false,
"semi": false,
"singleQuote": true,
"trailingComma": "none",
"bracketSpacing": true,
"jsxBracketSameLine": false,
"arrowParens": "avoid",
"endOfLine": "auto"
}
7 changes: 2 additions & 5 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
const BABEL_MODULE = process.env.BABEL_MODULE

function makePresets (module) {
function makePresets(module) {
return [
['@babel/preset-env', { modules: module }],
['@babel/preset-react', { modules: module }]
]
}

const plugins = [
'@babel/plugin-proposal-object-rest-spread',
'@babel/plugin-transform-runtime'
]
const plugins = ['@babel/plugin-proposal-object-rest-spread', '@babel/plugin-transform-runtime']

module.exports = {
env: {
Expand Down
1 change: 1 addition & 0 deletions examples/cra/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SKIP_PREFLIGHT_CHECK=true
3 changes: 3 additions & 0 deletions examples/cra/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "../../.eslintrc.js"
}
Loading