diff --git a/.eslintrc.js b/.eslintrc.js index 7223f8117ea1..04b0f3ed1a58 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -12,39 +12,30 @@ module.exports = { parser: 'babel-eslint', extends: ['airbnb', 'prettier'], rules: { - // allow console - 'no-console': OFF, - // require radix argument in parseInt + 'no-console': OFF, // We have console.error, console.warn, etc. radix: ERROR, 'class-methods-use-this': OFF, - 'react/no-multi-comp': OFF, - 'import/no-extraneous-dependencies': OFF, - 'react/no-danger': OFF, 'no-empty': [ERROR, {allowEmptyCatch: true}], + 'no-param-reassign': OFF, + 'no-plusplus': OFF, + 'import/no-extraneous-dependencies': OFF, + 'react/jsx-closing-bracket-location': OFF, // Formatting is left to Prettier. + 'react/jsx-filename-extension': OFF, // Enable in future when migrating. + 'react/no-danger': OFF, // Need this to inject scripts. + 'react/no-multi-comp': OFF, // One component per file creates too many files. + 'react/no-unescaped-entities': [ERROR, {forbid: ['>', '}']}], // Existing ESLint errors sorted by frequency, silencing first. 'react/button-has-type': OFF, // 1 'react/forbid-prop-types': OFF, // 1 'react/require-default-props': OFF, // 1 'jsx-a11y/anchor-is-valid': OFF, // 9 - 'arrow-body-style': OFF, // 10 - 'react/jsx-curly-brace-presence': OFF, // 11 - 'react/no-unescaped-entities': OFF, // 12 - 'no-param-reassign': OFF, // 12 - 'spaced-comment': OFF, // 14 'import/no-unresolved': OFF, // 15 - 'object-shorthand': OFF, // 16 - 'dot-notation': OFF, // 19 'react/prefer-stateless-function': OFF, // 22 - 'no-plusplus': OFF, // 23 'prefer-arrow-callback': OFF, // 30 - 'react/jsx-filename-extension': OFF, // 31 - 'import/newline-after-import': OFF, // 31 - 'react/jsx-closing-bracket-location': OFF, // 36 'func-names': OFF, // 37 'import/no-dynamic-require': OFF, // 46 'prefer-destructuring': OFF, // 69 - 'prefer-const': OFF, // 71 'global-require': OFF, // 85 'react/jsx-one-expression-per-line': OFF, // 129 'react/prop-types': OFF, // 197 diff --git a/examples/basics/pages/en/help.js b/examples/basics/pages/en/help.js index 6434d7793716..ed5db281e1ce 100755 --- a/examples/basics/pages/en/help.js +++ b/examples/basics/pages/en/help.js @@ -8,6 +8,7 @@ const React = require('react'); const CompLibrary = require('../../core/CompLibrary.js'); + const Container = CompLibrary.Container; const GridBlock = CompLibrary.GridBlock; @@ -19,7 +20,7 @@ function docUrl(doc, language) { class Help extends React.Component { render() { - let language = this.props.language || ''; + const language = this.props.language || ''; const supportLinks = [ { content: `Learn more using the [documentation on this site.](${docUrl( diff --git a/examples/basics/pages/en/index.js b/examples/basics/pages/en/index.js index 0afae4234ebe..9bdd2743b31c 100755 --- a/examples/basics/pages/en/index.js +++ b/examples/basics/pages/en/index.js @@ -8,6 +8,7 @@ const React = require('react'); const CompLibrary = require('../../core/CompLibrary.js'); + const MarkdownBlock = CompLibrary.MarkdownBlock; /* Used to read markdown */ const Container = CompLibrary.Container; const GridBlock = CompLibrary.GridBlock; @@ -73,7 +74,7 @@ const PromoSection = props => ( class HomeSplash extends React.Component { render() { - let language = this.props.language || ''; + const language = this.props.language || ''; return ( @@ -179,7 +180,7 @@ const Showcase = props => { return (
-

Who's Using This?

+

Who is Using This?

This project is used by all these people

{showcase}
@@ -193,7 +194,7 @@ const Showcase = props => { class Index extends React.Component { render() { - let language = this.props.language || ''; + const language = this.props.language || ''; return (
diff --git a/examples/basics/pages/en/users.js b/examples/basics/pages/en/users.js index 458eb9757094..d741e3298101 100644 --- a/examples/basics/pages/en/users.js +++ b/examples/basics/pages/en/users.js @@ -8,6 +8,7 @@ const React = require('react'); const CompLibrary = require('../../core/CompLibrary.js'); + const Container = CompLibrary.Container; const siteConfig = require(process.cwd() + '/siteConfig.js'); @@ -30,7 +31,7 @@ class Users extends React.Component {
-

Who's Using This?

+

Who is Using This?

This project is used by many folks

{showcase}
diff --git a/examples/basics/siteConfig.js b/examples/basics/siteConfig.js index b73026bd0027..cbd6d7cbd911 100644 --- a/examples/basics/siteConfig.js +++ b/examples/basics/siteConfig.js @@ -5,10 +5,10 @@ * LICENSE file in the root directory of this source tree. */ -// See https://docusaurus.io/docs/site-config.html for all the possible +// See https://docusaurus.io/docs/site-config for all the possible // site configuration options. -/* List of projects/orgs using your project for the users page */ +// List of projects/orgs using your project for the users page. const users = [ { caption: 'User1', @@ -21,10 +21,10 @@ const users = [ ]; const siteConfig = { - title: 'Test Site' /* title for your website */, + title: 'Test Site', // Title for your website. tagline: 'A website for testing', - url: 'https://your-docusaurus-test-site.com' /* your website url */, - baseUrl: '/' /* base url for your project */, + url: 'https://your-docusaurus-test-site.com', // Your website URL + baseUrl: '/', // Base URL for your project */ // For github.io type URLs, you would set the url and baseUrl like: // url: 'https://facebook.github.io', // baseUrl: '/test-site/', @@ -52,14 +52,15 @@ const siteConfig = { footerIcon: 'img/docusaurus.svg', favicon: 'img/favicon.png', - /* colors for website */ + /* Colors for website */ colors: { primaryColor: '#2E8555', secondaryColor: '#205C3B', }, - /* custom fonts for website */ - /*fonts: { + /* Custom fonts for website */ + /* + fonts: { myFont: [ "Times New Roman", "Serif" @@ -68,26 +69,29 @@ const siteConfig = { "-apple-system", "system-ui" ] - },*/ + }, + */ - // This copyright info is used in /core/Footer.js and blog rss/atom feeds. + // This copyright info is used in /core/Footer.js and blog RSS/Atom feeds. copyright: 'Copyright © ' + new Date().getFullYear() + ' Your Name or Your Company Name', highlight: { - // Highlight.js theme to use for syntax highlighting in code blocks + // Highlight.js theme to use for syntax highlighting in code blocks. theme: 'default', }, - // Add custom scripts here that would be placed in