Convert eslint config and users/languages/editors files to YAML (#3516)

* YAML all the things

* Cleanup website data files

* Update edit links
master
Lucas Azzola 2017-12-18 21:55:10 +11:00 committed by GitHub
parent 56948a953e
commit d1c97b3622
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
23 changed files with 250 additions and 351 deletions

View File

@ -1,34 +0,0 @@
"use strict";
module.exports = {
env: {
es6: true,
node: true
},
extends: [
"eslint:recommended",
"plugin:react/recommended",
"plugin:prettier/recommended"
],
plugins: ["import"],
rules: {
curly: "error",
"import/no-extraneous-dependencies": [
"error",
{ devDependencies: ["tests*/**", "scripts/**"] }
],
"no-console": "off",
"no-else-return": "error",
"no-inner-declarations": "error",
"no-unneeded-ternary": "error",
"no-useless-return": "error",
"no-var": "error",
"one-var": ["error", "never"],
"prefer-arrow-callback": "error",
"prefer-const": "error",
"react/no-deprecated": "off",
strict: "error",
"symbol-description": "error",
yoda: ["error", "never", { exceptRange: true }]
}
};

32
.eslintrc.yml Normal file
View File

@ -0,0 +1,32 @@
env:
es6: true
node: true
extends:
- eslint:recommended
- plugin:react/recommended
- plugin:prettier/recommended
plugins:
- import
rules:
curly: error
import/no-extraneous-dependencies:
- error
- devDependencies: ["tests*/**", "scripts/**"]
no-console: off
no-else-return: error
no-inner-declarations: error
no-unneeded-ternary: error
no-useless-return: error
no-var: error
one-var:
- error
- never
prefer-arrow-callback: error
prefer-const: error
react/no-deprecated: off
strict: error
symbol-description: error
yoda:
- error
- never
- exceptRange: true

View File

@ -1,12 +0,0 @@
"use strict";
module.exports = {
overrides: [
{
files: "rollup.*.config.js",
parserOptions: {
sourceType: "module"
}
}
]
};

View File

@ -0,0 +1,4 @@
overrides:
- files: "rollup.*.config.js"
parserOptions:
sourceType: module

View File

@ -1,13 +0,0 @@
"use strict";
module.exports = {
env: {
jest: true
},
rules: {
strict: "off"
},
globals: {
run_spec: false
}
};

6
tests/.eslintrc.yml Normal file
View File

@ -0,0 +1,6 @@
env:
jest: true
rules:
strict: off
globals:
run_spec: false

View File

@ -1,7 +0,0 @@
"use strict";
module.exports = {
env: {
jest: true
}
};

View File

@ -0,0 +1,2 @@
env:
jest: true

View File

@ -1,7 +0,0 @@
"use strict";
module.exports = {
env: {
jest: true
}
};

View File

@ -0,0 +1,2 @@
env:
jest: true

View File

@ -1,7 +0,0 @@
"use strict";
module.exports = {
rules: {
"import/no-extraneous-dependencies": "off"
}
};

2
website/.eslintrc.yml Normal file
View File

@ -0,0 +1,2 @@
rules:
import/no-extraneous-dependencies: off

35
website/data/editors.yml Normal file
View File

@ -0,0 +1,35 @@
- image: "/images/atom-128px.png"
name: Atom
content: >
[`prettier-atom`](https://github.com/prettier/prettier-atom),
[`mprettier`](https://github.com/t9md/atom-mprettier)
- image: "/images/emacs-128px.png"
name: Emacs
content: >
[`prettier-emacs`](https://github.com/prettier/prettier-emacs)
- image: "/images/espresso-128px.png"
name: Espresso
content: >
[`espresso-prettier`](https://github.com/eablokker/espresso-prettier)
- image: "/images/sublimetext-128px.png"
name: Sublime Text
content: >
[`JsPrettier`](https://packagecontrol.io/packages/JsPrettier)
- image: "/images/vim-128px.png"
name: Vim
content: >
[`neoformat`](https://github.com/sbdchd/neoformat),
[`ale`](https://github.com/w0rp/ale),
[`vim-prettier`](https://github.com/prettier/vim-prettier)
- image: "/images/visualstudio-128px.png"
name: Visual Studio
content: >
[`JavaScriptPrettier`](https://github.com/madskristensen/JavaScriptPrettier)
- image: "/images/vscode-128px.png"
name: Visual Studio Code
content: >
[`prettier-vscode`](https://github.com/prettier/prettier-vscode)
- image: "/images/webstorm-128px.png"
name: WebStorm
content: >
[External Tool](https://prettier.io/docs/en/webstorm.html)

View File

@ -0,0 +1,26 @@
- name: JavaScript
image: "/images/js-128px.png"
variants:
- "[ES2017](https://github.com/tc39/proposals/blob/master/finished-proposals.md)"
- "[JSX](https://facebook.github.io/jsx/)"
- "[Flow](https://flow.org/)"
- "[TypeScript](https://www.typescriptlang.org/)"
- "[JSON](http://json.org/)"
- name: CSS
image: "/images/css-128px.png"
variants:
- "CSS3+"
- "[Less](http://lesscss.org/)"
- "[SCSS](http://sass-lang.com)"
- "[styled-components](http://styled-components.com) 💅"
- "[styled-jsx](http://npmjs.com/styled-jsx)"
- name: GraphQL
image: "/images/graphql-128px.png"
variants:
- "[GraphQL](http://graphql.org/)"
- "[GraphQL Schemas](http://graphql.org/learn/schema/)"
- name: Markdown
image: "/images/markdown-128px.png"
variants:
- "[CommonMark](http://commonmark.org/)"
- "[GitHub Flavored Markdown](https://github.github.com/gfm/)"

111
website/data/users.yml Normal file
View File

@ -0,0 +1,111 @@
- caption: React
image: "/images/react-200x100.png"
infoLink: https://facebook.github.io/react/
pinned: true
- caption: Jest
image: "/images/jest-200x100.png"
infoLink: https://facebook.github.io/jest/
pinned: true
- caption: Yarn
image: "/images/yarn-200x100.png"
infoLink: https://yarnpkg.com
pinned: true
- caption: Babel
image: "/images/babel-200x100.png"
infoLink: https://babeljs.io
pinned: true
- caption: ZEIT
image: "/images/zeit-200x100.png"
infoLink: https://zeit.co/
pinned: true
- caption: Webpack CLI
image: "/images/webpack-200x100.png"
infoLink: https://webpack.js.org/api/cli/
pinned: true
- caption: PayPal
image: "/images/paypal-200x100.png"
infoLink: https://github.com/paypal
- caption: Hudl
image: "/images/hudl-200x100.png"
infoLink: http://hudl.github.io/
- caption: Transloadit
image: "/images/transloadit-200x100.png"
infoLink: https://transloadit.com/
- caption: Tradeshift
image: "/images/tradeshift-200x100.png"
infoLink: https://tradeshift.com/
- caption: Algolia
image: "/images/algolia-200x100.png"
infoLink: https://algolia.com
- caption: IRESS
image: "/images/iress-200x100.png"
infoLink: https://iress.com
- caption: Outreach
image: "/images/outreach-200x100.png"
infoLink: https://www.outreach.io/
- caption: Material-UI
image: "/images/materialui-200x100.png"
infoLink: http://www.material-ui.com/
- caption: Wire
image: "/images/wire-200x100.png"
infoLink: https://wire.com
- caption: MoonMail
image: "/images/moonmail-200x100.png"
infoLink: https://moonmail.io
- caption: MONEI
image: "/images/monei-200x100.png"
infoLink: https://monei.net
- caption: Talkable
image: "/images/talkable-200x100.png"
infoLink: https://talkable.com
- caption: Smooth Code
image: "/images/smooth-code-200x100.png"
infoLink: https://www.smooth-code.com
- caption: Webflow
image: "/images/webflow-200x100.png"
infoLink: https://webflow.com
- caption: Eye Square
image: "/images/eyesquare-200x100.png"
infoLink: http://www.eye-square.com
- caption: Charlie Tango
image: "/images/charlietango-200x100.png"
infoLink: https://charlietango.dk
- caption: EventsTag
image: "/images/eventstag-200x100.png"
infoLink: https://eventstag.com
- caption: ZIP.ch
image: "/images/zipch-200x100.png"
infoLink: https://zip.ch
- caption: Nrwl
image: "/images/nrwl-200x100.png"
infoLink: https://nrwl.io
- caption: codemix
image: "/images/codemix-200x100.png"
infoLink: https://codemix.com
- caption: HolidayCheck
image: "/images/holidaycheck-200x100.png"
infoLink: https://www.holidaycheck.de
- caption: 7Span
image: "/images/sevenspan-200x100.png"
infoLink: https://7span.com
- caption: IDEATI
image: "/images/ideati-200x100.png"
infoLink: http://www.ideati.net
- caption: Mathrioshka
image: "/images/mathrioshka-200x100.png"
infoLink: https://mathrioshka.ru
- caption: Wingify
image: "/images/wingify-200x100.png"
infoLink: https://wingify.com
- caption: N26
image: "/images/n26-200x100.png"
infoLink: https://n26.com
- caption: Yelp
image: "/images/yelp-200x100.png"
infoLink: https://www.yelp.com
- caption: Hasura
image: "/images/hasura-200x100.png"
infoLink: https://hasura.io
- caption: Troops
image: "/images/troops-200x100.png"
infoLink: https://troops.ai

View File

@ -1,42 +0,0 @@
[
{
"image": "/images/atom-128px.png",
"name": "Atom",
"content": "[`prettier-atom`](https://github.com/prettier/prettier-atom), [`mprettier`](https://github.com/t9md/atom-mprettier)"
},
{
"image": "/images/emacs-128px.png",
"name": "Emacs",
"content": "[`prettier-emacs`](https://github.com/prettier/prettier-emacs)"
},
{
"image": "/images/espresso-128px.png",
"name": "Espresso",
"content": "[`espresso-prettier`](https://github.com/eablokker/espresso-prettier)"
},
{
"image": "/images/sublimetext-128px.png",
"name": "Sublime Text",
"content": "[`JsPrettier`](https://packagecontrol.io/packages/JsPrettier)"
},
{
"image": "/images/vim-128px.png",
"name": "Vim",
"content": "[`neoformat`](https://github.com/sbdchd/neoformat), [`ale`](https://github.com/w0rp/ale), [`vim-prettier`](https://github.com/prettier/vim-prettier)"
},
{
"image": "/images/visualstudio-128px.png",
"name": "Visual Studio",
"content": "[`JavaScriptPrettier`](https://github.com/madskristensen/JavaScriptPrettier)"
},
{
"image": "/images/vscode-128px.png",
"name": "Visual Studio Code",
"content": "[`prettier-vscode`](https://github.com/prettier/prettier-vscode)"
},
{
"image": "/images/webstorm-128px.png",
"name": "WebStorm",
"content": "[External Tool](https://prettier.io/docs/en/webstorm.html)"
}
]

View File

@ -1,40 +0,0 @@
[
{
"name": "JavaScript",
"image": "/images/js-128px.png",
"variants": [
"[ES2017](https://github.com/tc39/proposals/blob/master/finished-proposals.md)",
"[JSX](https://facebook.github.io/jsx/)",
"[Flow](https://flow.org/)",
"[TypeScript](https://www.typescriptlang.org/)",
"[JSON](http://json.org/)"
]
},
{
"name": "CSS",
"image": "/images/css-128px.png",
"variants": [
"CSS3+",
"[Less](http://lesscss.org/)",
"[SCSS](http://sass-lang.com)",
"[styled-components](http://styled-components.com) 💅",
"[styled-jsx](http://npmjs.com/styled-jsx)"
]
},
{
"name": "GraphQL",
"image": "/images/graphql-128px.png",
"variants": [
"[GraphQL](http://graphql.org/)",
"[GraphQL Schemas](http://graphql.org/learn/schema/)"
]
},
{
"name": "Markdown",
"image": "/images/markdown-128px.png",
"variants": [
"[CommonMark](http://commonmark.org/)",
"[GitHub Flavored Markdown](https://github.github.com/gfm/)"
]
}
]

View File

@ -5,6 +5,7 @@
"publish-gh-pages": "docusaurus-publish"
},
"devDependencies": {
"docusaurus": "^1.0.0-beta.10"
"docusaurus": "^1.0.0-beta.10",
"js-yaml": "^3.10.0"
}
}

View File

@ -140,7 +140,9 @@ class Index extends React.Component {
<p>Developed an integration?</p>
<a
href={`${siteConfig.githubUrl}/edit/master/website/editors.json`}
href={`${
siteConfig.githubUrl
}/edit/master/website/data/editors.yml`}
className="button"
>
Add it here

View File

@ -37,7 +37,9 @@ class Users extends React.Component {
<p>Are you using this project?</p>
</div>
<a
href={`${siteConfig.githubUrl}/edit/master/website/users.json`}
href={`${
siteConfig.githubUrl
}/edit/master/website/data/users.yml`}
className="button"
>
Add your company

View File

@ -2,12 +2,20 @@
// Docs: https://docusaurus.io/docs/en/site-config.html
const parseYaml = require("js-yaml").safeLoad;
const path = require("path");
const fs = require("fs");
const PACKAGE = require("../package");
const GITHUB_URL = `https://github.com/${PACKAGE.repository}`;
const users = require("./users");
const editors = require("./editors");
const supportedLanguages = require("./languages");
function loadYaml(fsPath) {
return parseYaml(fs.readFileSync(path.join(__dirname, fsPath), "utf8"));
}
const users = loadYaml("./data/users.yml");
const editors = loadYaml("./data/editors.yml");
const supportedLanguages = loadYaml("./data/languages.yml");
const siteConfig = {
title: "Prettier",

View File

@ -1,183 +0,0 @@
[
{
"caption": "React",
"image": "/images/react-200x100.png",
"infoLink": "https://facebook.github.io/react/",
"pinned": true
},
{
"caption": "Jest",
"image": "/images/jest-200x100.png",
"infoLink": "https://facebook.github.io/jest/",
"pinned": true
},
{
"caption": "Yarn",
"image": "/images/yarn-200x100.png",
"infoLink": "https://yarnpkg.com",
"pinned": true
},
{
"caption": "Babel",
"image": "/images/babel-200x100.png",
"infoLink": "https://babeljs.io",
"pinned": true
},
{
"caption": "ZEIT",
"image": "/images/zeit-200x100.png",
"infoLink": "https://zeit.co/",
"pinned": true
},
{
"caption": "Webpack CLI",
"image": "/images/webpack-200x100.png",
"infoLink": "https://webpack.js.org/api/cli/",
"pinned": true
},
{
"caption": "PayPal",
"image": "/images/paypal-200x100.png",
"infoLink": "https://github.com/paypal"
},
{
"caption": "Hudl",
"image": "/images/hudl-200x100.png",
"infoLink": "http://hudl.github.io/"
},
{
"caption": "Transloadit",
"image": "/images/transloadit-200x100.png",
"infoLink": "https://transloadit.com/"
},
{
"caption": "Tradeshift",
"image": "/images/tradeshift-200x100.png",
"infoLink": "https://tradeshift.com/"
},
{
"caption": "Algolia",
"image": "/images/algolia-200x100.png",
"infoLink": "https://algolia.com"
},
{
"caption": "IRESS",
"image": "/images/iress-200x100.png",
"infoLink": "https://iress.com"
},
{
"caption": "Outreach",
"image": "/images/outreach-200x100.png",
"infoLink": "https://www.outreach.io/"
},
{
"caption": "Material-UI",
"image": "/images/materialui-200x100.png",
"infoLink": "http://www.material-ui.com/"
},
{
"caption": "Wire",
"image": "/images/wire-200x100.png",
"infoLink": "https://wire.com"
},
{
"caption": "MoonMail",
"image": "/images/moonmail-200x100.png",
"infoLink": "https://moonmail.io"
},
{
"caption": "MONEI",
"image": "/images/monei-200x100.png",
"infoLink": "https://monei.net"
},
{
"caption": "Talkable",
"image": "/images/talkable-200x100.png",
"infoLink": "https://talkable.com"
},
{
"caption": "Smooth Code",
"image": "/images/smooth-code-200x100.png",
"infoLink": "https://www.smooth-code.com"
},
{
"caption": "Webflow",
"image": "/images/webflow-200x100.png",
"infoLink": "https://webflow.com"
},
{
"caption": "Eye Square",
"image": "/images/eyesquare-200x100.png",
"infoLink": "http://www.eye-square.com"
},
{
"caption": "Charlie Tango",
"image": "/images/charlietango-200x100.png",
"infoLink": "https://charlietango.dk"
},
{
"caption": "EventsTag",
"image": "/images/eventstag-200x100.png",
"infoLink": "https://eventstag.com"
},
{
"caption": "ZIP.ch",
"image": "/images/zipch-200x100.png",
"infoLink": "https://zip.ch"
},
{
"caption": "Nrwl",
"image": "/images/nrwl-200x100.png",
"infoLink": "https://nrwl.io"
},
{
"caption": "codemix",
"image": "/images/codemix-200x100.png",
"infoLink": "https://codemix.com"
},
{
"caption": "HolidayCheck",
"image": "/images/holidaycheck-200x100.png",
"infoLink": "https://www.holidaycheck.de"
},
{
"caption": "7Span",
"image": "/images/sevenspan-200x100.png",
"infoLink": "https://7span.com"
},
{
"caption": "IDEATI",
"image": "/images/ideati-200x100.png",
"infoLink": "http://www.ideati.net"
},
{
"caption": "Mathrioshka",
"image": "/images/mathrioshka-200x100.png",
"infoLink": "https://mathrioshka.ru"
},
{
"caption": "Wingify",
"image": "/images/wingify-200x100.png",
"infoLink": "https://wingify.com"
},
{
"caption": "N26",
"image": "/images/n26-200x100.png",
"infoLink": "https://n26.com"
},
{
"caption": "Yelp",
"image": "/images/yelp-200x100.png",
"infoLink": "https://www.yelp.com"
},
{
"caption": "Hasura",
"image": "/images/hasura-200x100.png",
"infoLink": "https://hasura.io"
},
{
"caption": "Troops",
"image": "/images/troops-200x100.png",
"infoLink": "https://troops.ai"
}
]

View File

@ -944,6 +944,10 @@ escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
esprima@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.0.tgz#4499eddcd1110e0b218bacf2fa7f7f59f55ca804"
esutils@^2.0.0, esutils@^2.0.2:
version "2.0.2"
resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b"
@ -1254,6 +1258,13 @@ js-tokens@^3.0.0, js-tokens@^3.0.2:
version "3.0.2"
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b"
js-yaml@^3.10.0:
version "3.10.0"
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.10.0.tgz#2e78441646bd4682e963f22b6e92823c309c62dc"
dependencies:
argparse "^1.0.7"
esprima "^4.0.0"
jsbn@~0.1.0:
version "0.1.1"
resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513"