Commit 0ee12f69 authored by Alf Eaton's avatar Alf Eaton

Add lint stage to pipeline

parent 48411e40
**/node_modules
image: node:7.9
stages:
- lint
- install
- bootstrap
- test
install:
stage: install
script: npm install
only:
- master
artifacts:
paths:
- node_modules
lint:
stage: lint
script: npm run lint
bootstrap:
stage: bootstrap
script: npm run bootstrap
only:
- master
artifacts:
paths:
- packages/*/node_modules
test:
stage: test
script: npm run test
only:
- master
#install:
# stage: install
# script: npm install
# only:
# - master
# artifacts:
# paths:
# - node_modules
#
#bootstrap:
# stage: bootstrap
# script: npm run bootstrap
# only:
# - master
# artifacts:
# paths:
# - packages/*/node_modules
#
#test:
# stage: test
# script: npm run test
# only:
# - master
# TODO: start?
# TODO: build
......
**/node_modules
{
"extends": "stylelint-config-standard"
"extends": "stylelint-config-standard",
"rules": {
"selector-pseudo-class-no-unknown": [true, {
"ignorePseudoClasses": ["global"]
}]
}
}
......@@ -25,7 +25,10 @@
"hoist": "lerna bootstrap --hoist --concurrency=1",
"clean": "lerna clean",
"styleguide": "lerna run styleguide",
"test": "lerna run test"
"test": "lerna run test",
"lint": "npm run lint:js && npm run lint:style",
"lint:js": "eslint packages",
"lint:style": "stylelint packages/**/*.scss packages/**/*.css"
},
"engines": {
"node": ">=7.9"
......
const path = require('path')
const webpack = require('webpack')
const ThemePlugin = require('pubsweet-theme-plugin')
const CopyWebpackPlugin = require('copy-webpack-plugin')
const rules = require('./common-rules')
const resolve = require('./common-resolve')
......
import React from 'react'
import { debounce } from 'lodash'
import { Editor as SlateEditor, Plain } from 'slate'
// import { Editor as SlateEditor, Plain } from 'slate'
import { Editor as SlateEditor } from 'slate'
import EditorToolbar from './EditorToolbar'
// TODO: move paste/drop handlers to plugins
......
import React from 'react'
import { converter } from './config'
import Editor from '../Editor'
import classes from './TextEditor.local.scss'
// TODO: only allow a single line of text (no line-breaks)
// TODO: ensure that content is saved when component is unmounted or blurred
const TextEditor = ({ value, placeholder, title, onChange }) => (
<Editor
className={classes.root}
value={value}
converter={converter}
placeholder={placeholder}
......
import React from 'react'
import { converter, keys, schema, toolbar } from './config'
import Editor from '../Editor'
import classes from './TitleEditor.local.scss'
// TODO: no blocks allowed
const TitleEditor = ({ value, placeholder, title, onChange }) => (
<Editor
className={classes.root}
value={value}
converter={converter}
schema={schema}
......
/* stylelint-disable */
/* trying to reuse some parts frome pubsweet website: the mixins for the underlines for the tags */
$color: var(--color-primary);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment