Skip to content

Commit

Permalink
everything else
Browse files Browse the repository at this point in the history
  • Loading branch information
jdpigeon committed Jun 22, 2020
1 parent 7760992 commit 27b267a
Show file tree
Hide file tree
Showing 26 changed files with 136 additions and 747 deletions.
6 changes: 1 addition & 5 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@ app/node_modules
# OSX
.DS_Store

# flow-typed
flow-typed/npm/*
!flow-typed/npm/module_vx.x.x.js

# App packaged
release
app/main.prod.js
Expand All @@ -50,4 +46,4 @@ main.js.map

.idea
npm-debug.log.*
.*.dockerfile
.*.dockerfile
11 changes: 7 additions & 4 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@ app/node_modules
# OSX
.DS_Store

# flow-typed
flow-typed/npm/*
!flow-typed/npm/module_vx.x.x.js

# App packaged
release
app/main.prod.js
Expand All @@ -51,3 +47,10 @@ main.js.map
.idea
npm-debug.log.*
__snapshots__

# Package.json
package.json
.travis.yml
*.css.d.ts
*.sass.d.ts
*.scss.d.ts
84 changes: 8 additions & 76 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,84 +1,16 @@
module.exports = {
parser: 'babel-eslint',
parserOptions: {
sourceType: 'module',
allowImportExportEverywhere: true,
},
extends: ['airbnb', 'prettier'],
env: {
browser: true,
node: true,
},
extends: 'erb/typescript',
rules: {
'arrow-parens': ['off'],
'compat/compat': 'error',
'consistent-return': 'off',
'comma-dangle': 'off',
'generator-star-spacing': 'off',
'flowtype/object-type-delimiter': 'off',
'flowtype/no-weak-types': 'warn',
'import/no-unresolved': 'error',
'import/no-extraneous-dependencies': 'off',
'jsx-a11y/anchor-is-valid': 'off',
'no-console': 'off',
'no-use-before-define': 'off',
'no-multi-assign': 'off',
'no-plusplus': 'off',
'no-param-reassign': 'warn',
'promise/param-names': 'error',
'promise/always-return': 'error',
'promise/catch-or-return': 'error',
'promise/no-native': 'off',
'prefer-destructuring': 'off',
'react/no-will-update-set-state': 'warn',
'react/no-did-mount-set-state': 'warn',
'react/no-did-update-set-state': 'warn',
'react/sort-comp': [
'error',
{
order: ['type-annotations', 'static-methods', 'lifecycle', 'everything-else', 'render'],
},
],
'react/jsx-no-bind': 'off',
'react/jsx-filename-extension': ['error', { extensions: ['.js', '.jsx'] }],
'react/prefer-stateless-function': 'off',
'linebreak-style': 'off',
'jsx-a11y/click-events-have-key-events': 'off',
'flowtype/boolean-style': ['error', 'boolean'],
'flowtype/define-flow-type': 'warn',
'flowtype/delimiter-dangle': 'off',
'flowtype/generic-spacing': ['error', 'never'],
'flowtype/no-primitive-constructor-types': 'error',
'flowtype/no-weak-types': 'warn',
'flowtype/object-type-delimiter': ['off'],
'flowtype/require-parameter-type': 'off',
'flowtype/require-return-type': 'off',
'flowtype/require-valid-file-annotation': 'off',
'flowtype/semi': ['error', 'always'],
'flowtype/space-after-type-colon': ['error', 'always'],
'flowtype/space-before-generic-bracket': ['error', 'never'],
'flowtype/space-before-type-colon': ['error', 'never'],
'flowtype/union-intersection-spacing': ['error', 'always'],
'flowtype/use-flow-type': 'error',
'flowtype/valid-syntax': 'error',
'react/no-will-update-set-state': 'warn',
'react/destructuring-assignment': 'off',
'react/jsx-props-no-spreading': 'warn',
'react/jsx-wrap-multilines': 'off',
'react/jsx-one-expression-per-line': 'off',
'import/order': 'off',
'max-classes-per-file': 'off',
'dot-notation': 'off',
'linebreak-style': 0,
'import/prefer-default-export': 0,
// A temporary hack related to IDE not resolving correct package.json
'import/no-extraneous-dependencies': 'off'
},
plugins: ['flowtype', 'import', 'promise', 'compat', 'react'],
settings: {
'import/resolver': {
// See https://github.com/benmosher/eslint-plugin-import/issues/1396#issuecomment-575727774 for line below
node: {},
webpack: {
config: require.resolve('./webpack.config.eslint.js'),
},
},
},
config: require.resolve('./configs/webpack.config.eslint.js')
}
}
}
};
61 changes: 9 additions & 52 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,77 +1,34 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Jupyter stuff
.ipynb_checkpoints
__pycache__


# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Auto-generated files
#yarn.lock
#package-lock.json

# flow-typed
flow-typed/npm

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/
app/utils/pyodide/src/

# TypeScript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
# Dependency directory
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
node_modules

# next.js build output
.next
# OSX
.DS_Store

# App packaged
release
Expand All @@ -82,13 +39,13 @@ app/renderer.prod.js.map
app/style.css
app/style.css.map
dist
app/dist
dll
dll/renderer.dev.dll.js
dll/renderer.json
main.js
main.js.map

.idea
npm-debug.log.*
*.css.d.ts
*.sass.d.ts
*.scss.d.ts
keys.js
2 changes: 0 additions & 2 deletions .npmrc

This file was deleted.

1 change: 0 additions & 1 deletion .nvmrc

This file was deleted.

9 changes: 0 additions & 9 deletions .prettierrc.yaml

This file was deleted.

3 changes: 0 additions & 3 deletions .stylelintrc

This file was deleted.

42 changes: 0 additions & 42 deletions .travis.yml

This file was deleted.

62 changes: 62 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
/* eslint global-require: off, import/no-extraneous-dependencies: off */

const developmentEnvironments = ['development', 'test'];

const developmentPlugins = [require('react-hot-loader/babel')];

const productionPlugins = [
require('babel-plugin-dev-expression'),

// babel-preset-react-optimize
require('@babel/plugin-transform-react-constant-elements'),
require('@babel/plugin-transform-react-inline-elements'),
require('babel-plugin-transform-react-remove-prop-types')
];

module.exports = api => {
// See docs about api at https://babeljs.io/docs/en/config-files#apicache

const development = api.env(developmentEnvironments);

return {
presets: [
// @babel/preset-env will automatically target our browserslist targets
require('@babel/preset-env'),
require('@babel/preset-typescript'),
[require('@babel/preset-react'), { development }]
],
plugins: [
// Stage 0
require('@babel/plugin-proposal-function-bind'),

// Stage 1
require('@babel/plugin-proposal-export-default-from'),
require('@babel/plugin-proposal-logical-assignment-operators'),
[require('@babel/plugin-proposal-optional-chaining'), { loose: false }],
[
require('@babel/plugin-proposal-pipeline-operator'),
{ proposal: 'minimal' }
],
[
require('@babel/plugin-proposal-nullish-coalescing-operator'),
{ loose: false }
],
require('@babel/plugin-proposal-do-expressions'),

// Stage 2
[require('@babel/plugin-proposal-decorators'), { legacy: true }],
require('@babel/plugin-proposal-function-sent'),
require('@babel/plugin-proposal-export-namespace-from'),
require('@babel/plugin-proposal-numeric-separator'),
require('@babel/plugin-proposal-throw-expressions'),

// Stage 3
require('@babel/plugin-syntax-dynamic-import'),
require('@babel/plugin-syntax-import-meta'),
[require('@babel/plugin-proposal-class-properties'), { loose: true }],
require('@babel/plugin-proposal-json-strings'),

...(development ? developmentPlugins : productionPlugins)
]
};
};
34 changes: 0 additions & 34 deletions babel.config.json

This file was deleted.

3 changes: 0 additions & 3 deletions flow-typed/module_vx.x.x.js

This file was deleted.

Loading

0 comments on commit 27b267a

Please sign in to comment.