sublimelint | Error highlighting in Sublime Text | Code Editor library
kandi X-RAY | sublimelint Summary
kandi X-RAY | sublimelint Summary
Error highlighting in Sublime Text.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Run linters
- Return a list of selector tuples for the given view
- Return the linters associated with a view
- Return True if file is excluded
- Assign a view
- Check if language can be used
- Get settings for this plugin
- Remove a linter
- Install linter updates
- Get the SHA of the head of a repo
- Loop forever
- Print to stdout
- Run SublimeLint
- Finish the view
- Update settings
- Returns the path to the command
- Reload a module
- Called when a view is activated
- Relect a region
- Run linter
- Run single selection
- Run the command
- Run quick panel
- Reload plugins
- Match regex
- Called when the user is loaded
sublimelint Key Features
sublimelint Examples and Code Snippets
Community Discussions
Trending Discussions on sublimelint
QUESTION
In Visual Studio Code I get
Parsing error: The keyword 'import' is reserved
.
1
What actions would you recommend to remedy this error?
I provide my .eslintrc.json
and package.json
files below.
However, they will likely not be sufficient to reproduce the error.
So here is a link to
a zip file containing all the necessary project files.
2
The project is (locally) installed by running npm install
– this may
take about 5-9 minutes.
Then npm start
should open the project in the default web browser.
3
When I do this and hit F12, I get no errors but two warnings
in the console of the browser.
The warnings are:
'unUsedArgument' is defined but never used. Allowed unused args must match /^_/u no-unused-vars
, and'unUsedVariable' is assigned a value but never used. Allowed unused vars must match /^_/u no-unused-vars
.
The error in the title, Parsing error: The keyword 'import' is reserved
, shows up when I open App.js
in VS Code.
But this error has nothing to do with my choice of text editor,
which is easy to confirm by running ESLint from the command line.
Use the first line if you are on Microsoft Windows (backslashes).
Use the second line if you are on any other operating system (forward
slashes).
ANSWER
Answered 2022-Mar-12 at 16:11If the server is running, close it by hitting Ctrl+C.
I strongly recommend uninstalling any global installations of
ESLint.
To see what global packages are installed, in the command line run:
1
QUESTION
When using Sublime text 3 I had SublimeLinter with SublimeLinter-eslint packages, along with eslint & babel-eslint global node modules for JS & JSX syntax.
With the switch to Sublime 4 I decided to give LSP a try. I Installed it, also LSP-css (which ran fine out of the box) & LSP-eslint, which couldn't get to work.
If I check Sublime's status bar I see the language server apparently running (?)
This is within a project with it's own eslintrc.js
config file, which works out of the box in VScode. Part of it below:
ANSWER
Answered 2021-Jul-19 at 13:48Installing LSP-typescript did the trick, works out of the box, lsp-eslint not even needed. Unreal.
Found the info here after days of research (thanks chrsap!).
If you are running ST3, check LSP-typescript's readme for needed packages.
QUESTION
I like the python package radon and use it fairly often to help find/reduce complex code.
I'm normally developing in Sublime Text, and running radon beside in console, but would really like to have radon (or something similar) in sublime that will flag my function w/ a complexity that gives me any ranking less than "A"..kinda like pylint does when my code is junk.
I looked around for a SublimeLinter plugin that would check code complexity as you are typing out function etc. Has anyone seen a SublimeLinter plugin like that?
Thanks!
...ANSWER
Answered 2021-Jun-25 at 15:26I ended up creating a plugin for SublimeLinter. https://github.com/christopherpickering/SublimeLinter-contrib-radon
QUESTION
I have installed SublimeLinter-flake8. I would like to exclude the W191 warning when I am using SublimeLinter with flake8
. I have checked the SublimeLinter docs and tried adding "--ignore W191"
to my user settings file and reloaded plugins but I still get warned about the usage of tabs.
The following is my Packages/User/SublimeLinter.sublime-settings
file.
ANSWER
Answered 2021-Feb-20 at 03:58The linter_name
has to be the specific plugin you're looking to configure (in this case flake8
) -- try this:
QUESTION
I'm using Pylint with Sublime Text 3 on Windows 8.1
. It is configured to run on save with Ctrl+S
:
ANSWER
Answered 2020-Nov-25 at 17:38You could write a plugin that inherits the ViewEventListener
class and implement the on_post_save_async()
callback method to sleep for a second (is that really enough, will it always be enough!?) and then use self.view.run_command()
to launch Pylint. Ensure run_on_save
is false if you do so. Here's the relevant bit of the API.
BUT doing that is NOT a good idea — you're asking for further problems with the output panels, error messages, and Sublime crashes.
I suggest you take full control of manually launching the linter. Set the Pylint run_on_save
setting to false
. Assign convenient keys to launch the linter when you want it and get out of the habit of running it automatically every time you save a file. Linters are like spell checkers, it is much more efficient to run them from time to time and make all the necessary changes in one go, rather than having the linter run over and over again, repeatedly validating the same code, just to check the most recent few lines.
If you try and write larger and larger amounts of code without building or linting then in time the accuracy and speed of your coding will improve.
QUESTION
I hope it is ok to ask this even though it is not specifically a programming question. I installed the SublimeLinter
and SublimeLinter-flake8
packages in Sublime Text 3.
I did pip install flake8
and restarted but the console shows the following message:
SublimeLinter: WARNING: cannot locate 'flake8'. Fill in the 'python' or 'executable' setting. WARNING:SublimeLinter.lint.base_linter.python_linter:cannot locate 'flake8'.Fill in the 'python' or 'executable' setting
I suspect it may have to do with setting a path in the user settings, but I am not sure how to go about it. As you may see I am a relative newbie. Thanks.
...ANSWER
Answered 2020-May-11 at 10:44Please ensure you've followed these steps:
Install SublimeText packages (help)
- SublimeLinter
- SublimeLinter-flake8
Install Flake8 (use
pip
, orpip3
if you have multiple python versions)pip3 install flake8
- Configure
flake8
settings- Open Sublime Text
- Sublime Text -> Preferences -> Package Settings -> Sublime Linter -> Settings
- Set the path to the desired python version:
Notice: Custom settings needs to be on the right(user) side!
QUESTION
I am using the Anaconda package for Sublime 3, and it works perfectly. My only problem is that linting highlights all kind of errors, warnings and PEP8 recommendations in the same color, white. I would like to change it so errors are red, warnings are yellow etc... But I can't figure out how to do that. I found this resource that basically tells me to add some XML code to my current theme to change the linting color, but I tried doing that, and it did nothing.
First of all I believe now themes are using json and not XML anymore, in filenames of the type ".sublime-color-scheme" or ".sublime-theme". Thus I found a custom theme that indeed had a ".tmtheme" file, and pasted the XML code given here, but linting was still completely white.
Then I tried translating this XML code into json, and pasting it into the ".sublime-color-scheme" file, but then again, linting was white. To be precise, I pasted it in the "rules" :[]
entry, since that seemed to fit the format.
Anybody with more experience could tell me what I'm doing wrong, or point me to another way of changing linting color ? I am aware of package such as SublimeLinter, but I'd rather stick with the built-in linter of the Anaconda package since its working perfectly beside the coloring.
...ANSWER
Answered 2020-Feb-27 at 20:16As you've noted, there are two different types of color schemes in Sublime Text:
The
tmTheme
format, which is an XML plist file. This format is still supported, but is considered to be a legacy file format at this point.The
sublime-color-scheme
format, which is a JSON file. This format can do everything that thetmTheme
format can do, and has extra capabilities thattmTheme
files don't.
NOTE: Despite the name,
tmTheme
files are color schemes, not Themes. The format is unfortunately named, but in Sublime Text aTheme
is an entirely different thing that styles the application look as a whole.This distinction isn't particularly important here, but it can catch you unaware if you go searching for information because you sometimes end up finding information that doesn't seem to apply to anything.
It's hard to say exactly what you might have done wrong since you didn't include the content that you tried adding to the files. Generally I would expect that anything you added in there would either work or cause an error of some sort (either a popup or in the Sublime console), barring any configuration issues with the package itself.
As an added note, I don't use this package (or linters in general), so for test purposes the Anaconda settings I tested with are stock except for the following two settings:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install sublimelint
You can use sublimelint like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page