Comments (3)
Unfortunately no. This linter just wraps the upstream https://github.com/btford/write-good which doesn't handle this, and the Atom linter system has no solution for limiting the scope of where a linter runs.
from linter-write-good.
@gepoch there must be a way to do it, considering that one of the official linters (tidy) has support for scopes: https://github.com/AtomLinter/linter-tidy, wrapping around something else doesn't prevent you from using scopes, and it seems neither does being inside of AtomLinter.
from linter-write-good.
Are you referring to the "grammarScopes" setting in that package?
grammarScopes just decides what file types the linter applies to. It doesn't control any higher-resolution application of the linter, unfortunately.
From the linter docs:
grammarScopes is an array of scopes your Linter provider should be invoked on. To determine the proper value, put your cursor in an editor in a location where you expect your provider to activate and run Editor: Log Cursor Scope from the Atom Command Palette, you’ll get a list of scopes, one of which should start with “source”. Choose the most specific source.___ entry as what you use in grammarScopes. If your base linter is able to handle multiple types of files, enter each scope individually in the array.
Notice the scope starts with "source._" That's the language level grammar. You can't specify anything narrower. If you try to set grammarScopes to something more specific, it doesn't work.
At any rate, if you look at the tidy linter source, it's working in the same way that linter-write-good works. It just invokes the upstream linter on the entire file and then marshals the output into a data structure so that linter can parse an display it. This package is just a bridge to the write-good library, and that remains the best place to address the issue.
from linter-write-good.
Related Issues (20)
- Dependency Dashboard
- How do I refresh the linting? HOT 2
- Lint comments HOT 1
- How can I ignore certain file extensions? HOT 2
- How to configure to only process certain file extensions? HOT 1
- Disable linter for code snippets in markdown HOT 1
- Toggling plugin on/off HOT 1
- How to exclude checks on "passive" HOT 1
- Upgrade write-good package HOT 3
- Option to ignore file extensions HOT 1
- Give better error message than "failed to run undefined undefined" if node unavailable HOT 6
- Failed to activate the linter-write-good package HOT 1
- E-prime linting doesn’t support smart quotes HOT 1
- Failed to load the linter-write-good package HOT 4
- Request: Configurable grammer scope HOT 1
- Pass custom checks
- v1 API of linter no longer supported, breaks this package HOT 1
- Action Required: Fix Renovate Configuration
- Usage HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from linter-write-good.