Skip to content

Crash whenever I type style on component? #282

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Tj3n opened this issue Apr 1, 2021 · 3 comments
Closed

Crash whenever I type style on component? #282

Tj3n opened this issue Apr 1, 2021 · 3 comments

Comments

@Tj3n
Copy link

Tj3n commented Apr 1, 2021

Hi, I'm not sure what's wrong with my setup ( is quite default from Ignite ) but I'm getting crash whenever I try to type style in any components, doesn't matter what is it. Remove this from extends then it stop but also stopping inline style checking.
Thanks in advance!

Here's the log:

[Error - 10:27:12 PM] ESLint stack trace:
[Error - 10:27:12 PM] TypeError: Cannot read property 'expression' of null
Occurred while linting C:\Users\app\screens\cook-details\cook-details-info.tsx:22
    at JSXAttribute (C:\Users\node_modules\eslint-plugin-react-native\lib\rules\no-single-element-style-arrays.js:40:24)
    at C:\Users\node_modules\eslint\lib\linter\safe-emitter.js:45:58
    at Array.forEach (<anonymous>)
    at Object.emit (C:\Users\node_modules\eslint\lib\linter\safe-emitter.js:45:38)
    at NodeEventGenerator.applySelector (C:\Users\node_modules\eslint\lib\linter\node-event-generator.js:256:26)
    at NodeEventGenerator.applySelectors (C:\Users\node_modules\eslint\lib\linter\node-event-generator.js:285:22)
    at NodeEventGenerator.enterNode (C:\Users\node_modules\eslint\lib\linter\node-event-generator.js:299:14)
    at CodePathAnalyzer.enterNode (C:\Users\node_modules\eslint\lib\linter\code-path-analysis\code-path-analyzer.js:711:23)
    at C:Users\node_modules\eslint\lib\linter\linter.js:954:32
    at Array.forEach (<anonymous>)

Here's my eslint config:

"eslintConfig": {
    "root": true,
    "parser": "@typescript-eslint/parser",
    "extends": [
      "eslint:recommended",
      "plugin:@typescript-eslint/eslint-recommended",
      "plugin:@typescript-eslint/recommended",
      "plugin:react/recommended",
      "plugin:react-native/all",
      "standard",
      "prettier"
    ],
    "plugins": [
      "@typescript-eslint",
      "react",
      "react-native",
      "prettier"
    ],
    "parserOptions": {
      "ecmaFeatures": {
        "jsx": true
      },
      "project": "./tsconfig.json"
    },
    "settings": {
      "react": {
        "pragma": "React",
        "version": "detect"
      }
    },
    "globals": {
      "__DEV__": false,
      "jasmine": false,
      "beforeAll": false,
      "afterAll": false,
      "beforeEach": false,
      "afterEach": false,
      "test": false,
      "expect": false,
      "describe": false,
      "jest": false,
      "it": false
    },
    "rules": {
      "@typescript-eslint/ban-ts-ignore": 0,
      "@typescript-eslint/explicit-function-return-type": 0,
      "@typescript-eslint/explicit-member-accessibility": 0,
      "@typescript-eslint/explicit-module-boundary-types": 0,
      "@typescript-eslint/indent": 0,
      "@typescript-eslint/member-delimiter-style": 0,
      "@typescript-eslint/no-empty-interface": 0,
      "@typescript-eslint/no-explicit-any": 0,
      "@typescript-eslint/no-object-literal-type-assertion": 0,
      "@typescript-eslint/no-var-requires": 0,
      "comma-dangle": 0,
      "multiline-ternary": 0,
      "no-undef": 0,
      "no-unused-vars": 0,
      "no-use-before-define": "off",
      "quotes": 0,
      "react-native/no-raw-text": 0,
      "react/no-unescaped-entities": 0,
      "react/prop-types": "off",
      "space-before-function-paren": 0,
      "@typescript-eslint/no-extra-semi": 0,
      "generator-star-spacing": "off",
      "yield-star-spacing": "off",
      "template-curly-spacing": "off",
      "indent": "off"
    }
@AlanSl
Copy link

AlanSl commented May 19, 2021

See #278

@Intellicode
Copy link
Owner

Should be fixed as discussed in #278

@Tj3n
Copy link
Author

Tj3n commented May 29, 2021

@AlanSl @Intellicode The fix in #278 doesn't fix this issue, I still have to add "react-native/no-single-element-style-arrays": 0 to makes it stop crashing, just typed style then it crash instantly without any ="something" or the sort. I'm using v3.11.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants