Giter Site home page Giter Site logo

eslint-config-website's People

Contributors

silencerweb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

eslint-config-website's Issues

Uncaught TypeError: Cannot read property 'category' of undefined

Hey, I would love to check your tool out, but, unfortunately, https://eslint-config.netlify.com displays nothing but an empty page. There are two errors in the console:

react-dom.production.min.js:3833 TypeError: Cannot read property 'category' of undefined
    at n.i.componentDidMount (sidebar.js:142)
    at $s (react-dom.production.min.js:5300)
    at Ls (react-dom.production.min.js:5055)
    at Ts (react-dom.production.min.js:5022)
    at xs (react-dom.production.min.js:4957)
    at Zo (react-dom.production.min.js:4883)
    at Is (react-dom.production.min.js:5487)
    at Ns (react-dom.production.min.js:5495)
    at Us.render (react-dom.production.min.js:5685)
    at react-dom.production.min.js:5770
yo @ react-dom.production.min.js:3833
Fo.n.callback @ react-dom.production.min.js:4166
hr @ react-dom.production.min.js:2700
ur @ react-dom.production.min.js:2686
$s @ react-dom.production.min.js:5321
Ls @ react-dom.production.min.js:5055
Ts @ react-dom.production.min.js:5022
xs @ react-dom.production.min.js:4957
Zo @ react-dom.production.min.js:4883
Is @ react-dom.production.min.js:5487
Ns @ react-dom.production.min.js:5495
Us.render @ react-dom.production.min.js:5685
(anonymous) @ react-dom.production.min.js:5770
Ms @ react-dom.production.min.js:5417
Vs @ react-dom.production.min.js:5769
render @ react-dom.production.min.js:5798
178 @ index.js:27
f @ (index):1
80 @ index.js:27
f @ (index):1
a @ (index):1
e @ (index):1
(anonymous) @ main.3c084f6a.chunk.js:1

react-dom.production.min.js:5037 Uncaught TypeError: Cannot read property 'category' of undefined
    at n.i.componentDidMount (sidebar.js:142)
    at $s (react-dom.production.min.js:5300)
    at Ls (react-dom.production.min.js:5055)
    at Ts (react-dom.production.min.js:5022)
    at xs (react-dom.production.min.js:4957)
    at Zo (react-dom.production.min.js:4883)
    at Is (react-dom.production.min.js:5487)
    at Ns (react-dom.production.min.js:5495)
    at Us.render (react-dom.production.min.js:5685)
    at react-dom.production.min.js:5770

It looks like the error is coming from these lines.

// ...
  componentDidMount = () => {
    const activeRule = this.props.rules.find((rule) => rule.isActive);

    if (activeRule.category === 'Possible Errors') {
    // ...

Switches on left sidebar don't toggle unless user clicks on rule for details

Hi,

First of all, thank you for publishing this tool. This is something that was really missing from the ESLint ecosystem ๐Ÿ‘

There seems to be an issue with the switches: they update on the right panel, but don't on the left sidebar. They only update when I select a rule to display rule details.

Add missing rule options

Possible Errors

no-console: allow (array option)
no-extra-parens: conditionalAssign, returnAssign, nestedBinaryExpressions, ignoreJSX, enforceForArrowConditionals (because these options can be used only if the first option is set to "all")
no-invalid-regexp: allowConstructorFlags (array option)
valid-jsdoc: prefer, preferType (object options)

Best Practices

class-methods-use-this: exceptMethods (array option)
curly: consistent (because it can be used only if the first option is set to "multi*")
no-empty-function: allow (array option)
no-extend-native: exceptions (array option)
no-global-assign: exceptions (array option)
no-implicit-coercion: allow (array option)
no-magic-numbers: ignore (array option)
no-multi-spaces: exceptions (object option)
no-param-reassign: ignorePropertyModificationsFor (array option, also works only if option props is set to "true")
no-restricted-properties: second option is an object option
no-warning-comments: terms (array option)
yoda: exceptRange, onlyEquality (because these options can be used only if the first option is set to "never")

Variables

init-declarations: ignoreForLoopInit (because it can be used only if the first option is set to "never")
no-restricted-globals
no-shadow: allow (array option)

Node.js and CommonJS

callback-return: second option is an array option
no-restricted-modules

Stylistic Issues

array-bracket-newline: multiline, minItems (because you have to pass either a string or an object with these options, I decided better to use a string)
array-element-newline: multiline, minItems (because you have to pass either a string or an object with these options, I decided better to use a string)
camelcase: allow (array option)
comma-dangle: arrays, objects, imports, exports, functions (because you have to pass either a string or an object with these options, I decided better to use a string)
comma-style: exceptions (object option)
function-paren-newline: minItems (because you have to pass either a string or an object with these options, I decided better to use a string)
id-blacklist
id-length: exceptions (array option)
indent: SwitchCase, VariableDeclarator, outerIIFEBody, MemberExpression, FunctionDeclaration, FunctionExpression, CallExpression, ArrayExpression, ObjectExpression, ImportDeclaration, ignoredNodes (too hard)
key-spacing: align, singleLine, multiLine (object options)
keyword-spacing: overrides (object option)
new-cap: newIsCapExceptions, capIsNewExceptions (array options)
no-bitwise: allow (array option)
no-mixed-operators: groups (array of arrays option)
no-restricted-syntax
no-underscore-dangle: allow (array option)
nonblock-statement-body-position: overrides (object option)
object-curly-newline: multiline, minProperties, consistent (because you have to pass either a string or an object with these options, I decided better to use a string)
object-curly-spacing: arraysInObjects, objectsInObjects (because these options depend on first value)
one-var: var, let const, separateRequires, initialized, uninitialized (because you have to pass either a string or an object with these options, I decided better to use a string)
operator-linebreak: overrides (object option)
padded-blocks: blocks, classes, switches (because you have to pass either a string or an object with these options, I decided better to use a string)
padding-line-between-statements
quote-props: keywords, unnecessary, numbers (because these options depend on first value)
require-jsdoc: require (object option)
semi: omitLastInOneLineBlock, beforeStatementContinuationChars (because these options depend on first value)
space-before-blocks: functions, keywords, classes (because you have to pass either a string or an object with these options, I decided better to use a string)
space-before-function-paren: anonymous, named, asyncArrow (because you have to pass either a string or an object with these options, I decided better to use a string)
space-in-parens: exceptions (array option)
space-unary-ops: overrides (object option)
spaced-comment: exceptions, markers, balanced (because these options are inside an object that inside another object)

ECMAScript 6

arrow-body-style: requireReturnForObjectLiteral (because it can be used only if the first option is set to "as-needed")
arrow-parens: requireForBlockBody (because it can be used only if the first option is set to "as-needed")
generator-star-spacing: first option (because you have to pass either a string or an object with these options, I decided better to use an object)
no-restricted-imports
object-shorthand: avoidQuotes, ignoreConstructors, avoidExplicitReturnArrows (because there options depend on the value of the first option)
prefer-destructuring
sort-imports: memberSyntaxSortOrder (array option)
yield-star-spacing: first option (because you have to pass either a string or an object with these options, I decided better to use an object)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.