Adds eslint to dependencies and resolves code to match rules
This commit is contained in:
parent
6163deb1c9
commit
b3600dce85
4 changed files with 20 additions and 19 deletions
|
@ -19,10 +19,10 @@ export default {
|
||||||
'parametric design',
|
'parametric design',
|
||||||
'{{type}}',
|
'{{type}}',
|
||||||
'sewing',
|
'sewing',
|
||||||
'sewing pattern',
|
'sewing pattern'
|
||||||
],
|
],
|
||||||
optionGroups: {
|
optionGroups: {
|
||||||
fit: ['size'],
|
fit: ['size']
|
||||||
},
|
},
|
||||||
measurements: [],
|
measurements: [],
|
||||||
dependencies: {},
|
dependencies: {},
|
||||||
|
@ -30,6 +30,6 @@ export default {
|
||||||
hide: [],
|
hide: [],
|
||||||
parts: ['box'],
|
parts: ['box'],
|
||||||
options: {
|
options: {
|
||||||
size: { pct: 50, min: 10, max: 100 },
|
size: { pct: 50, min: 10, max: 100 }
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,6 +49,11 @@
|
||||||
"axios": "0.21.1",
|
"axios": "0.21.1",
|
||||||
"react-intl": "5.17.6",
|
"react-intl": "5.17.6",
|
||||||
"prop-types": "15.7.2",
|
"prop-types": "15.7.2",
|
||||||
"file-saver": "^2.0.5"
|
"file-saver": "^2.0.5",
|
||||||
|
"eslint": "^7.27.0",
|
||||||
|
"eslint-config-standard": "^16.0.3",
|
||||||
|
"eslint-config-standard-react": "^11.0.1",
|
||||||
|
"eslint-plugin-node": "^11.1.0",
|
||||||
|
"eslint-plugin-promise": "^5.1.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,22 +5,20 @@ import commonjs from '@rollup/plugin-commonjs'
|
||||||
import json from '@rollup/plugin-json'
|
import json from '@rollup/plugin-json'
|
||||||
import { terser } from 'rollup-plugin-terser'
|
import { terser } from 'rollup-plugin-terser'
|
||||||
import peerDepsExternal from 'rollup-plugin-peer-deps-external'
|
import peerDepsExternal from 'rollup-plugin-peer-deps-external'
|
||||||
//import postcss from 'rollup-plugin-postcss'
|
// import postcss from 'rollup-plugin-postcss'
|
||||||
import { name, version, description, author, license } from './package.json'
|
import { main, module, name, version, description, author, license } from './package.json'
|
||||||
|
|
||||||
import pkg from './package.json'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
input: 'src/index.js',
|
input: 'src/index.js',
|
||||||
output: [
|
output: [
|
||||||
{
|
{
|
||||||
file: pkg.main,
|
file: main,
|
||||||
format: 'cjs',
|
format: 'cjs',
|
||||||
sourcemap: true,
|
sourcemap: true,
|
||||||
exports: 'default'
|
exports: 'default'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
file: pkg.module,
|
file: module,
|
||||||
format: 'es',
|
format: 'es',
|
||||||
sourcemap: true,
|
sourcemap: true,
|
||||||
exports: 'default'
|
exports: 'default'
|
||||||
|
@ -28,9 +26,7 @@ export default {
|
||||||
],
|
],
|
||||||
plugins: [
|
plugins: [
|
||||||
peerDepsExternal(),
|
peerDepsExternal(),
|
||||||
//postcss({
|
// postcss({ modules: true }),
|
||||||
// modules: true
|
|
||||||
//}),
|
|
||||||
url({ exclude: ['**/*.svg'] }),
|
url({ exclude: ['**/*.svg'] }),
|
||||||
babel({
|
babel({
|
||||||
exclude: 'node_modules/**'
|
exclude: 'node_modules/**'
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
export default function (part) {
|
export default function (part) {
|
||||||
let {
|
const {
|
||||||
options,
|
options,
|
||||||
Point,
|
Point,
|
||||||
Path,
|
Path,
|
||||||
|
@ -10,10 +10,10 @@ export default function (part) {
|
||||||
complete,
|
complete,
|
||||||
sa,
|
sa,
|
||||||
paperless,
|
paperless,
|
||||||
macro,
|
macro
|
||||||
} = part.shorthand()
|
} = part.shorthand()
|
||||||
|
|
||||||
let w = 500 * options.size
|
const w = 500 * options.size
|
||||||
points.topLeft = new Point(0, 0)
|
points.topLeft = new Point(0, 0)
|
||||||
points.topRight = new Point(w, 0)
|
points.topRight = new Point(w, 0)
|
||||||
points.bottomLeft = new Point(0, w / 2)
|
points.bottomLeft = new Point(0, w / 2)
|
||||||
|
@ -47,12 +47,12 @@ export default function (part) {
|
||||||
macro('hd', {
|
macro('hd', {
|
||||||
from: points.bottomLeft,
|
from: points.bottomLeft,
|
||||||
to: points.bottomRight,
|
to: points.bottomRight,
|
||||||
y: points.bottomLeft.y + sa + 15,
|
y: points.bottomLeft.y + sa + 15
|
||||||
})
|
})
|
||||||
macro('vd', {
|
macro('vd', {
|
||||||
from: points.bottomRight,
|
from: points.bottomRight,
|
||||||
to: points.topRight,
|
to: points.topRight,
|
||||||
x: points.topRight.x + sa + 15,
|
x: points.topRight.x + sa + 15
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue