Skip to content

Commit

Permalink
other minor updates
Browse files Browse the repository at this point in the history
  • Loading branch information
jdpigeon committed Aug 9, 2020
1 parent 2eb02a7 commit 2b3485b
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 12 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ app/node_modules

# App packaged
release
app/*.main.prod.js
app/main.prod.js
app/main.prod.js.map
app/renderer.prod.js
Expand Down
20 changes: 15 additions & 5 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,25 @@ module.exports = {
'react/no-will-update-set-state': 'warn',
'react/prop-types': 'off',
'react/static-property-placement': 'off',
'react/no-array-index-key': 'off'
'react/no-array-index-key': 'off',
},
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
project: './tsconfig.json',
tsconfigRootDir: __dirname,
createDefaultProgram: true,
},
settings: {
'import/resolver': {
// See https://github.com/benmosher/eslint-plugin-import/issues/1396#issuecomment-575727774 for line below
node: {},
webpack: {
config: require.resolve('./configs/webpack.config.eslint.js')
}
}
}
config: require.resolve('./configs/webpack.config.eslint.js'),
},
},
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx'],
},
},
};
14 changes: 7 additions & 7 deletions babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ const productionPlugins = [
// 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')
require('babel-plugin-transform-react-remove-prop-types'),
];

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

const development = api.env(developmentEnvironments);
Expand All @@ -23,7 +23,7 @@ module.exports = api => {
// @babel/preset-env will automatically target our browserslist targets
require('@babel/preset-env'),
require('@babel/preset-typescript'),
[require('@babel/preset-react'), { development }]
[require('@babel/preset-react'), { development }],
],
plugins: [
// Stage 0
Expand All @@ -35,11 +35,11 @@ module.exports = api => {
[require('@babel/plugin-proposal-optional-chaining'), { loose: false }],
[
require('@babel/plugin-proposal-pipeline-operator'),
{ proposal: 'minimal' }
{ proposal: 'minimal' },
],
[
require('@babel/plugin-proposal-nullish-coalescing-operator'),
{ loose: false }
{ loose: false },
],
require('@babel/plugin-proposal-do-expressions'),

Expand All @@ -56,7 +56,7 @@ module.exports = api => {
[require('@babel/plugin-proposal-class-properties'), { loose: true }],
require('@babel/plugin-proposal-json-strings'),

...(development ? developmentPlugins : productionPlugins)
]
...(development ? developmentPlugins : productionPlugins),
],
};
};

0 comments on commit 2b3485b

Please sign in to comment.