Skip to content

Commit

Permalink
style(*): Add prettier for js, json, md, yml code formatting (#3277)
Browse files Browse the repository at this point in the history
  • Loading branch information
mcous authored Apr 9, 2019
1 parent 988407d commit 2f37cba
Show file tree
Hide file tree
Showing 954 changed files with 39,557 additions and 39,712 deletions.
25 changes: 12 additions & 13 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
fixes:
-"api/src/opentrons/"::"opentrons/"
- 'api/src/opentrons/::opentrons/'
ignore:
- "architecture-and-planning"
- "audio"
- "compute"
- "**/node_modules"
- "protocol-library-kludge"
- "shared-data/definitions"
- "shared-data/definitions2"
- "shared-data/robot-data"
- "shared-data/protocol-json-schema"
- "shared-data/labware-json-schema"
- "webpack-config"

- 'architecture-and-planning'
- 'audio'
- 'compute'
- '**/node_modules'
- 'protocol-library-kludge'
- 'shared-data/definitions'
- 'shared-data/definitions2'
- 'shared-data/robot-data'
- 'shared-data/protocol-json-schema'
- 'shared-data/labware-json-schema'
- 'webpack-config'
5 changes: 5 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
api/**
update-server/**
**/node_modules/**
**/coverage/**
**/dist/**
Expand All @@ -12,3 +13,7 @@ api/**
# compiled
app-shell/lib/**
discovery-client/lib/**

# prettier
**/package.json
**/CHANGELOG.md
9 changes: 5 additions & 4 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,16 @@ module.exports = {
'standard',
'plugin:react/recommended',
'plugin:flowtype/recommended',
'plugin:prettier/recommended',
'prettier/flowtype',
'prettier/react',
'prettier/standard',
],

plugins: ['flowtype', 'react', 'json'],
plugins: ['flowtype', 'react', 'json', 'prettier'],

rules: {
camelcase: 'off',
'object-curly-spacing': 'off',
'comma-dangle': ['error', 'always-multiline'],
'flowtype/delimiter-dangle': ['error', 'always-multiline'],
},

globals: {},
Expand Down
15 changes: 15 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
'use strict'

module.exports = {
printWidth: 80, // default
tabWidth: 2, // default
useTabs: false, // default
semi: false,
singleQuote: true,
jsxSingleQuote: false, // default
trailingComma: 'es5',
bracketSpacing: true, // default
jsxBracketSameLine: false, // default
arrowParens: 'avoid', // default
endOfLine: 'lf',
}
97 changes: 47 additions & 50 deletions .stylelintrc.js
Original file line number Diff line number Diff line change
@@ -1,63 +1,60 @@
module.exports = {
extends: [
'stylelint-config-standard',
],
extends: ['stylelint-config-standard'],

ignoreFiles: [
'api/**',
'**/dist/**',
'**/coverage/**',
'**/venv/**',
],
ignoreFiles: ['api/**', '**/dist/**', '**/coverage/**', '**/venv/**'],

rules: {
'selector-class-pattern': /^[a-z0-9_]+$/,

// support css-modules
'selector-pseudo-class-no-unknown': [ true, {
ignorePseudoClasses: [
'export',
'import',
'global',
'local',
],
}],
'selector-pseudo-class-no-unknown': [
true,
{
ignorePseudoClasses: ['export', 'import', 'global', 'local'],
},
],

'property-no-unknown': [ true, {
ignoreProperties: [
// css-modules
// TODO(mc, 2018-02-09): stop using composes
'composes',
'compose-with',
'property-no-unknown': [
true,
{
ignoreProperties: [
// css-modules
// TODO(mc, 2018-02-09): stop using composes
'composes',
'compose-with',

// lost grid (http://lostgrid.org/docs.html)
// TODO(mc, 2018-02-09): use stylelint-config-lost once stylelint-
// config-css-modules property-no-unknown no longer conflicts
'lost-align',
'lost-center',
'lost-column',
'lost-flex-container',
'lost-masonry-column',
'lost-masonry-wrap',
'lost-move',
'lost-offset',
'lost-row',
'lost-unit',
'lost-utility',
'lost-waffle',
],
}],
// lost grid (http://lostgrid.org/docs.html)
// TODO(mc, 2018-02-09): use stylelint-config-lost once stylelint-
// config-css-modules property-no-unknown no longer conflicts
'lost-align',
'lost-center',
'lost-column',
'lost-flex-container',
'lost-masonry-column',
'lost-masonry-wrap',
'lost-move',
'lost-offset',
'lost-row',
'lost-unit',
'lost-utility',
'lost-waffle',
],
},
],

'at-rule-no-unknown': [ true, {
ignoreAtRules: [
// TODO(mc, 2018-02-09): stop using @value
'value',
'at-rule-no-unknown': [
true,
{
ignoreAtRules: [
// TODO(mc, 2018-02-09): stop using @value
'value',

// lost grid (http://lostgrid.org/docs.html)
// TODO(mc, 2018-02-09): use stylelint-config-lost once stylelint-
// config-css-modules at-rule-no-unknown no longer conflicts
'lost',
],
}],
// lost grid (http://lostgrid.org/docs.html)
// TODO(mc, 2018-02-09): use stylelint-config-lost once stylelint-
// config-css-modules at-rule-no-unknown no longer conflicts
'lost',
],
},
],
},
}
Loading

0 comments on commit 2f37cba

Please sign in to comment.