parent
f3997536e5
commit
1b837f2e21
@ -0,0 +1,21 @@
|
||||
module.exports = {
|
||||
env: {
|
||||
node: true,
|
||||
browser: true,
|
||||
es6: true,
|
||||
jest: true,
|
||||
},
|
||||
extends: ['eslint:recommended'],
|
||||
parser: 'babel-eslint',
|
||||
rules: {
|
||||
'linebreak-style': ['error', 'unix'],
|
||||
'no-console': ['error', {allow: ['warn', 'error']}],
|
||||
'no-shadow': 'error',
|
||||
'no-duplicate-imports': 'error',
|
||||
'no-var': 'error',
|
||||
'prefer-const': 'error',
|
||||
'object-shorthand': 'error',
|
||||
'no-useless-rename': 'error',
|
||||
'no-use-before-define': ['error', {functions: false}],
|
||||
},
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
module.exports = {
|
||||
env: {
|
||||
test: {
|
||||
plugins: [
|
||||
'@babel/plugin-transform-modules-commonjs',
|
||||
'@babel/plugin-proposal-class-properties',
|
||||
],
|
||||
},
|
||||
},
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
const config = require('kcd-scripts/jest')
|
||||
|
||||
module.exports = {
|
||||
...config,
|
||||
testEnvironment: 'jsdom',
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
import * as pkg from './package.json'
|
||||
|
||||
const pkgDependencies = Object.keys({
|
||||
...pkg.dependencies,
|
||||
...pkg.devDependencies,
|
||||
...pkg.peerDependencies,
|
||||
...pkg.optionalDependencies,
|
||||
})
|
||||
|
||||
export default {
|
||||
input: 'src/index',
|
||||
output: [
|
||||
{file: pkg.main, format: 'cjs', sourcemap: true},
|
||||
{file: pkg.module, format: 'es', sourcemap: true},
|
||||
],
|
||||
external: [...pkgDependencies],
|
||||
}
|
Loading…
Reference in new issue