search
HomeDevelopment ToolssublimeImplement code detection in sublime

The following column sublime usage tutorial will introduce to you how to implement code detection in sublime. I hope it will be helpful to friends in need!

Implement code detection in sublime

Configure linter, eslint in sublime

sublime plug-in installation

Open pci, install sublimeLinter

Enter and configure the path:

● Configure the basic location of the node:/usr/local/bin/node, /usr/local/bin

● The basic location for configuring node_modules: /usr/local/lib/node_modules

● The location for configuring other plug-ins: such as eslint: /usr/local/bin/eslint

Example The code is as follows:

"paths": {
  "linux": [],
  "osx": [
      "/usr/local/bin/node",
      "/usr/local/lib/node_modules",
      "/usr/local/bin/eslint",
      "/usr/local/bin/jslint"
  ],
  "windows": []
}

Install the plug-in (taking eslint as an example):

Install the npm plug-in for eslint, including:

sudo npm i eslint babel-eslint -g

● Put the path of the installed tool into the path, that is: /usr/local/bin/eslint

● In the project Configure the .eslintrc file, similar to: (Each project needs to be configured)

● It includes a lot of dependencies. You can enter eslint . in the project, and then follow the prompts to sudo npm i -g for the missing dependencies. ***

Then you can use it happily!

You can right-click to enter sublimelinter to call its function.

.eslintrc file example

{
    "env": {
        "browser": true,
        "node": true,
        "es6": true
    },
    "parser": "babel-eslint",
    "extends" : [
      "airbnb"
    ],
    "plugins": [
      "babel",
      "promise"
    ],
    "ecmaFeatures": {
       "jsx": true
    },
    "rules": {
        "semi": [2, "always"],
        "quotes": [2, "single"]
    }
}

Finally

show the sublimelinter-user.settings after the configuration is completed:

{
    "user": {
        "debug": true,
        "delay": 0.25,
        "error_color": "D02000",
        "gutter_theme": "Packages/SublimeLinter/gutter-themes/Default/Default.gutter-theme",
        "gutter_theme_excludes": [],
        "lint_mode": "background",
        "linters": {
            "eslint": {
                "@disable": false,
                "args": [],
                "ecmaFeatures": {
                    "jsx": true
                },
                "env": {
                    "browser": true,
                    "es6": true,
                    "node": true
                },
                "excludes": [],
                "extends": [
                    "standard"
                ],
                "parser": "babel-eslint",
                "plugins": [
                    "babel",
                    "promise"
                ],
                "rules": {
                    "quotes": [
                        2,
                        "single"
                    ],
                    "semi": [
                        2,
                        "always"
                    ]
                }
            },
            "jsxhint": {
                "@disable": false,
                "args": [],
                "excludes": []
            }
        },
        "mark_style": "stippled underline",
        "no_column_highlights_line": false,
        "passive_warnings": false,
        "paths": {
            "linux": [],
            "osx": [
                "/usr/local/bin/node",
                "/usr/local/lib/node_modules",
                "/usr/local/bin/eslint"
            ],
            "windows": []
        },
        "python_paths": {
            "linux": [],
            "osx": [],
            "windows": []
        },
        "rc_search_limit": 3,
        "shell_timeout": 10,
        "show_errors_on_save": false,
        "show_marks_in_minimap": true,
        "syntax_map": {
            "html (django)": "html",
            "html (rails)": "html",
            "html 5": "html",
            "javascript (babel)": "javascript",
            "magicpython": "python",
            "php": "html",
            "python django": "python",
            "pythonimproved": "python"
        },
        "warning_color": "DDB700",
        "wrap_find": true
    }
}

The above is the detailed content of Implement code detection in sublime. For more information, please follow other related articles on the PHP Chinese website!

Statement
This article is reproduced at:segmentfault. If there is any infringement, please contact admin@php.cn delete
Is Sublime Text Free? Understanding the LicensingIs Sublime Text Free? Understanding the LicensingMay 09, 2025 am 12:10 AM

SublimeTextisfreeduringanunlimitedtrial,buta$99licenseisrecommendedforregularuse.1)Thetrialallowsfullfeatureaccesswithouttimelimits.2)Alicenseoffersperpetualuse,futureupdates,andremovespurchasereminders,enhancingproductivityandsupportingdevelopers.

Sublime Text: Enhancing Your Coding WorkflowSublime Text: Enhancing Your Coding WorkflowMay 08, 2025 am 12:19 AM

SublimeText can greatly improve work efficiency. 1) Multiple selection and multicursor functions allow editing of multiple positions at the same time, 2) Command panel provides fast function access, 3) Macros and fragments can automate common operations, 4) Optimized configuration and shortcut key use can improve performance and efficiency.

Sublime Text: Free to Try, Not Necessarily Free to OwnSublime Text: Free to Try, Not Necessarily Free to OwnMay 07, 2025 am 12:02 AM

SublimeText offers a free trial, but ultimately requires a paid purchase for a permanent authorization. 1) During the free trial period, users can experience its functions, but they will receive a purchase prompt. 2) After purchase, users can use it permanently, no subscription fee, and access more plug-ins and themes.

Sublime Text: Comparing Paid and Unpaid FeaturesSublime Text: Comparing Paid and Unpaid FeaturesMay 06, 2025 am 12:07 AM

ThemaindifferencesbetweenthepaidandunpaidversionsofSublimeTextaretheremovalofstatusbarremindersandoccasionalpop-uppromptsinthepaidversion.1)Unregisteredversion:fullyfunctionalwithallcorefeatureslikesyntaxhighlighting,codecompletion,andcommandpalette,

Sublime Text: The Cost of a Powerful EditorSublime Text: The Cost of a Powerful EditorMay 05, 2025 am 12:04 AM

SublimeText is worth buying. 1) Its simple interface and powerful functions, such as multi-line editing and GotoAnything, improve development efficiency. 2) Rich plug-in ecosystem, such as Anaconda, enhances the development experience. 3) Although the price is $70, its performance and fluency are great value for professional developers.

Sublime Text: Code Completion, Syntax Highlighting, and MoreSublime Text: Code Completion, Syntax Highlighting, and MoreMay 04, 2025 am 12:04 AM

SublimeText is loved by developers for its powerful code completion and syntax highlighting capabilities. 1) Code completion can automatically prompt function names, variable names, etc. to improve programming efficiency. 2) Syntax highlighting distinguishes code elements through different colors to improve readability and error detection speed.

Sublime Text vs. VS Code: A Comparative AnalysisSublime Text vs. VS Code: A Comparative AnalysisMay 03, 2025 am 12:07 AM

SublimeTextisidealforthosevaluingspeedandsimplicity,whileVSCodesuitsthoseneedingextensivefeaturesandcustomization.SublimeTextoffersquickfileaccesswith"GotoAnything"andaminimalisticapproach,butmaylackout-of-the-boxfunctionality.VSCodeprovide

Sublime Text: Your Coding CompanionSublime Text: Your Coding CompanionMay 02, 2025 am 12:01 AM

SublimeTextisapowerfulcodingcompanionduetoitsspeed,customization,andkeyfeatures.1)Itoffersincrediblespeedforhandlinglargefiles.2)Itsflexibilityallowsextensivecustomizationwithpluginsandthemes.3)Featureslikemultiplecursors,GotoAnything,CommandPalette,

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!