Skip to content

Commit

Permalink
front end infratructure
Browse files Browse the repository at this point in the history
  • Loading branch information
debuggy committed Mar 21, 2019
1 parent f323165 commit 9dc2ea9
Show file tree
Hide file tree
Showing 32 changed files with 2,461 additions and 7,509 deletions.
Empty file removed .babelrc
Empty file.
14 changes: 14 additions & 0 deletions .babelrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module.exports = {
presets: [
// Compile to environments listed in .browserslistrc
"@babel/env",
"@babel/typescript",
"@babel/react",
],
plugins: [
// class { handleThing = () => { } }
"@babel/proposal-class-properties",
// { ...spread }
"@babel/proposal-object-rest-spread",
],
}
14 changes: 14 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# http://editorconfig.org

root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false
4 changes: 4 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/coverage
/dist
/examples
/node_modules
47 changes: 47 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
module.exports = {
plugins: [
"@typescript-eslint",
"jest",
],
extends: [
"airbnb-typescript",
"plugin:@typescript-eslint/recommended",
"plugin:jest/recommended",
"prettier",
"prettier/react",
"prettier/@typescript-eslint",
],
env: {
node: true,
browser: true,
jest: true,
},
rules: {
"no-console": "off",
// Too restrictive, writing ugly code to defend against a very unlikely scenario: https://eslint.org/docs/rules/no-prototype-builtins
"no-prototype-builtins": "off",
// https://basarat.gitbooks.io/typescript/docs/tips/defaultIsBad.html
"import/prefer-default-export": "off",
"import/no-default-export": "error",
// Too restrictive: https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/destructuring-assignment.md
"react/destructuring-assignment": "off",
// No jsx extension: https://github.com/facebook/create-react-app/issues/87#issuecomment-234627904
"react/jsx-filename-extension": "off",
// add devDependencies for webpack https://github.com/airbnb/javascript/issues/1168
'import/no-extraneous-dependencies': ['error', {
devDependencies: [
'spec/**',
'test/**',
'tests/**',
'**/__tests__/**',
'webpack.config.js',
'webpack.config.*.js',
'webpack.*.config.js', // add this file type
'src/server/**',
'gulpfile.js',
'Gruntfile',
],
optionalDependencies: false,
}],
},
}
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

# production
/build
/dist

# misc
.DS_Store
Expand All @@ -20,4 +21,5 @@ npm-debug.log*
yarn-debug.log*
yarn-error.log*

.vscode/
/.vscode
/.eslintcache
12 changes: 12 additions & 0 deletions .markdownlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
default: true

# Some services use a linebreak-sensitive renderer, e.g. GitHub comment and BitBucket
line-length: false

no-trailing-punctuation:
# Allow headings to end with question mark for FAQ
punctuation: ".,;:"

# Prettier handles these:
list-marker-space: false
no-multiple-blanks: false
6 changes: 6 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/coverage
/dist
/examples
/node_modules
/yarn.lock

Loading

0 comments on commit 9dc2ea9

Please sign in to comment.