Giter Club home page Giter Club logo

Comments (11)

coderaiser avatar coderaiser commented on May 25, 2024

Could you please show me input file?

from putout.

dotai2012 avatar dotai2012 commented on May 25, 2024

I updated the description. When I disable putout in eslint config, it works fine

from putout.

coderaiser avatar coderaiser commented on May 25, 2024

What putout options do you have configured? I don’t see section plugins and rules in:

{
  "parser": "@babel/eslint-parser",
  "parserOptions": {
    "ecmaVersion": "latest",
    "jsx": true,
    "requireConfigFile": false,
    "sourceType": "module"
  }

from putout.

dotai2012 avatar dotai2012 commented on May 25, 2024

This is my full config file

{
  "env": {
    "browser": true,
    "jest/globals": true,
    "jquery": true,
    "node": true,
    "react-native/react-native": true
  },
  "extends": [
    "airbnb",
    "airbnb-typescript",
    "airbnb/hooks",
    "plugin:@typescript-eslint/eslint-recommended",
    "plugin:@typescript-eslint/recommended",
    "plugin:json/recommended",
    "plugin:jsx-a11y/recommended",
    "plugin:lodash/recommended",
    "plugin:node/recommended",
    "plugin:optimize-regex/recommended",
    "plugin:react-hooks/recommended",
    "plugin:react-native/all",
    "plugin:react-redux/recommended",
    "plugin:react/recommended",
    "plugin:vue/vue3-recommended",
    "plugin:vue-scoped-css/vue3-recommended",
    "plugin:security/recommended",
    "plugin:sonarjs/recommended",
    "plugin:unicorn/recommended",
    "plugin:import/errors",
    "plugin:import/typescript",
    "plugin:array-func/recommended",
    "plugin:@getify/proper-arrows/getify-says",
    "plugin:no-unsanitized/DOM",
    "plugin:putout/recommended",
    "plugin:promise/recommended",
    "plugin:regexp/recommended"
  ],
  "overrides": [
    {
      "files": [
        "**/*.ts",
        "**/*.tsx"
      ],
      "parser": "@typescript-eslint/parser",
      "rules": {
        "@typescript-eslint/ban-ts-ignore": 0,
        "@typescript-eslint/explicit-function-return-type": "error",
        "@typescript-eslint/explicit-module-boundary-types": "error",
        "@typescript-eslint/interface-name-prefix": 0,
        "@typescript-eslint/no-explicit-any": 0,
        "@typescript-eslint/no-non-null-assertion": 0,
        "@typescript-eslint/no-var-requires": "error"
      }
    },
    {
      "files": [
        "**/*.vue"
      ],
      "parser": "vue-eslint-parser",
      "parserOptions": {
        "parser": "@typescript-eslint/parser"
      }
    }
  ],
  "parser": "@babel/eslint-parser",
  "parserOptions": {
    "ecmaVersion": "latest",
    "jsx": true,
    "requireConfigFile": false,
    "sourceType": "module"
  },
  "plugins": [
    "@typescript-eslint",
    "html",
    "json",
    "json-format",
    "jsx-a11y",
    "lodash",
    "node",
    "optimize-regex",
    "react",
    "react-hooks",
    "react-native",
    "react-redux",
    "security",
    "sonarjs",
    "unicorn",
    "import",
    "array-func",
    "@getify/proper-arrows",
    "jest",
    "putout",
    "promise",
    "regexp",
    "no-constructor-bind"
  ],
  "rules": {
    "@getify/proper-arrows/name": 0,
    "@getify/proper-arrows/params": 0,
    "@getify/proper-arrows/return": 0,
    "@getify/proper-arrows/this": 0,
    "@getify/proper-arrows/where": 0,
    "@typescript-eslint/ban-ts-comment": 0,
    "@typescript-eslint/dot-notation": 0,
    "@typescript-eslint/explicit-function-return-type": 0,
    "@typescript-eslint/explicit-module-boundary-types": 0,
    "@typescript-eslint/naming-convention": 0,
    "@typescript-eslint/no-implied-eval": 0,
    "@typescript-eslint/no-throw-literal": 0,
    "@typescript-eslint/no-unused-expressions": 0,
    "@typescript-eslint/no-var-requires": 0,
    "@typescript-eslint/return-await": 0,
    "@typescript-eslint/space-before-function-paren": [
      "error"
    ],
    "@typescript-eslint/triple-slash-reference": 0,
    "camelcase": 0,
    "func-names": 0,
    "global-require": 0,
    "import/extensions": [
      "error",
      "ignorePackages",
      {
        "js": "never",
        "jsx": "never",
        "ts": "never",
        "tsx": "never"
      }
    ],
    "import/no-dynamic-require": 0,
    "import/no-extraneous-dependencies": 0,
    "import/no-named-as-default-member": 0,
    "import/prefer-default-export": 0,
    "indent": 0,
    "jest/no-disabled-tests": "warn",
    "jest/no-focused-tests": "error",
    "jest/no-identical-title": "error",
    "jest/prefer-to-have-length": "warn",
    "jest/valid-expect": "error",
    "jsx-a11y/click-events-have-key-events": 0,
    "jsx-a11y/label-has-associated-control": 0,
    "jsx-a11y/no-static-element-interactions": 0,
    "linebreak-style": 0,
    "lodash/chaining": 0,
    "lodash/import-scope": 0,
    "lodash/prefer-constant": 0,
    "lodash/prefer-immutable-method": 0,
    "lodash/prefer-lodash-method": 0,
    "lodash/prefer-some": 0,
    "max-classes-per-file": 0,
    "max-len": 0,
    "new-cap": 0,
    "no-async-promise-executor": 0,
    "no-console": 0,
    "no-constructor-bind/no-constructor-bind": "error",
    "no-constructor-bind/no-constructor-state": "error",
    "no-extend-native": 0,
    "no-lone-blocks": 0,
    "no-param-reassign": 0,
    "no-plusplus": 0,
    "no-process-exit": 0,
    "no-restricted-properties": 0,
    "no-underscore-dangle": 0,
    "node/no-missing-import": 0,
    "node/no-unpublished-import": 0,
    "node/no-unpublished-require": 0,
    "node/no-unsupported-features/es-syntax": 0,
    "putout/align-spaces": 0,
    "putout/destructuring-as-function-argument": 0,
    "putout/keyword-spacing": 0,
    "putout/newline-function-call-arguments": 0,
    "putout/putout": [
      "error",
      {
        "rules": {
          "apply-numeric-separators": "off",
          "convert-for-each-to-for-of": "off",
          "promises/add-missing-await": "off",
          "remove-console": "off",
          "remove-constant-conditions": "off",
          "remove-empty/import": "off",
          "remove-unused-types": "off",
          "remove-unused-variables": "off",
          "simplify-assignment": "off",
          "split-nested-destructuring": "off",
          "strict-mode/add": "off"
        }
      }
    ],
    "quote-props": 0,
    "react-native/no-color-literals": 0,
    "react-native/no-raw-text": 0,
    "react-native/no-single-element-style-arrays": 0,
    "react/destructuring-assignment": 0,
    "react/display-name": 0,
    "react/forbid-prop-types": 0,
    "react/jsx-filename-extension": [
      1,
      {
        "extensions": [
          ".js",
          ".jsx",
          ".tsx"
        ]
      }
    ],
    "react/jsx-fragments": 0,
    "react/jsx-props-no-spreading": 0,
    "react/no-access-state-in-setstate": 0,
    "react/prop-types": 0,
    "react/require-default-props": 0,
    "react/state-in-constructor": 0,
    "react/style-prop-object": 0,
    "security/detect-child-process": 0,
    "security/detect-non-literal-fs-filename": 0,
    "security/detect-non-literal-regexp": 0,
    "security/detect-object-injection": 0,
    "security/detect-possible-timing-attacks": 0,
    "sonarjs/cognitive-complexity": 0,
    "sonarjs/no-small-switch": 0,
    "space-before-function-paren": "off",
    "unicorn/catch-error-name": 0,
    "unicorn/filename-case": 0,
    "unicorn/no-array-for-each": 0,
    "unicorn/no-array-reduce": 0,
    "unicorn/no-process-exit": 0,
    "unicorn/no-reduce": 0,
    "unicorn/no-useless-undefined": 0,
    "unicorn/numeric-separators-style": 0,
    "unicorn/prefer-module": 0,
    "unicorn/prefer-node-protocol": 0,
    "unicorn/prefer-spread": 0,
    "unicorn/prevent-abbreviations": 0
  },
  "settings": {
    "import/resolver": {
      "node": {
        "extensions": [
          ".js",
          ".jsx",
          ".ts",
          ".tsx"
        ]
      }
    },
    "json/ignore-files": [
      "**/package-lock.json"
    ],
    "json/json-with-comments-files": [
      "**/tsconfig.json",
      ".vscode/**"
    ],
    "json/sort-package-json": "standard",
    "react": {
      "version": "latest"
    }
  }
}

from putout.

coderaiser avatar coderaiser commented on May 25, 2024

What is the name of input file?

from putout.

dotai2012 avatar dotai2012 commented on May 25, 2024

It's app.js:

I update my packages every week so probably the issue comes from any commit from the last 7-8 days

from putout.

coderaiser avatar coderaiser commented on May 25, 2024

How do you run putout? What CLI options do you use? Could you please try npx putout app.js?

from putout.

dotai2012 avatar dotai2012 commented on May 25, 2024

How do you run putout? What CLI options do you use? Could you please try npx putout app.js?

No I use putout-eslint. The command I used is:

eslint app.js

from putout.

dotai2012 avatar dotai2012 commented on May 25, 2024

Ok, I rolled back to v19.1.0, and there is no error now

from putout.

coderaiser avatar coderaiser commented on May 25, 2024

I can't reproduce, with package.json:

{
  "name": "issue-80",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "devDependencies": {
    "@babel/eslint-parser": "^7.15.4",
    "eslint": "^7.32.0",
    "eslint-plugin-node": "^11.1.0",
    "eslint-plugin-putout": "^10.0.0",
    "putout": "^20.0.0"
  }
}

eslintrc.json:

{
  "parser": "@babel/eslint-parser",
  "parserOptions": {
    "ecmaVersion": "latest",
    "jsx": true,
    "requireConfigFile": false,
    "sourceType": "module"
  },
  "extends": [
       "plugin:putout/recommended"
  ],
  "plugins": [
      "putout"
  ],
  "rules": {
      "putout/putout": [
      "error",
      {
        "rules": {
          "apply-numeric-separators": "off",
          "convert-for-each-to-for-of": "off",
          "promises/add-missing-await": "off",
          "remove-console": "off",
          "remove-constant-conditions": "off",
          "remove-empty/import": "off",
          "remove-unused-types": "off",
          "remove-unused-variables": "off",
          "simplify-assignment": "off",
          "split-nested-destructuring": "off",
          "strict-mode/add": "off"
        }
      }
    ]
   }
}

and app.js:

const testMissingColon = '123
coderaiser@localcmd:~/issue-80$ eslint app.js

/Users/coderaiser/issue-80/app.js
  1:31  error  Missing semicolon  semi

βœ– 1 problem (1 error, 0 warnings)
  1 error and 0 warnings potentially fixable with the `--fix` option.

from putout.

coderaiser avatar coderaiser commented on May 25, 2024

Closed due to inability to reproduce.

from putout.

Related Issues (20)

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.