Skip to content

Commit

Permalink
First commit
Browse files Browse the repository at this point in the history
  • Loading branch information
TeroFrondelius committed Jan 24, 2017
0 parents commit e646923
Show file tree
Hide file tree
Showing 6 changed files with 106 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.DS_Store
npm-debug.log
node_modules
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## 0.1.0 - First Release
* Every feature added
* Every bug fixed
20 changes: 20 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Copyright (c) 2017 Tero Frondelius

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# linter-example package

A short description of your package.

![A screenshot of your package](https://f.cloud.github.com/assets/69169/2290250/c35d867a-a017-11e3-86be-cd7c5bf3ff9b.gif)
45 changes: 45 additions & 0 deletions lib/linter-example.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
'use babel'

export function activate() {
// Fill something here, optional
}

export function deactivate() {
// Fill something here, optional
}

export function provideLinter() {
return {
name: 'Example',
scope: 'file', // or 'project'
lintsOnChange: true, // or true
grammarScopes: ['*'],
lint(textEditor) {
const editorPath = textEditor.getPath()

// Do something sync
return [{
severity: 'info',
location: {
file: editorPath,
position: [[0, 0], [0, 1]],
},
excerpt: `A random value is ${Math.random()}`,
description: `### What is this?\nThis is a randomly generated value`
}]

// Do something async
return new Promise(function(resolve) {
resolve([{
severity: 'info',
location: {
file: editorPath,
position: [[0, 0], [0, 1]],
},
excerpt: `A random value is ${Math.random()}`,
description: `### What is this?\nThis is a randomly generated value`
}])
})
}
}
}
30 changes: 30 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"name": "linter-example",
"main": "./lib/linter-example",
"version": "0.0.0",
"description": "A short description of your package",
"keywords": [
],
"activationCommands": {
"atom-workspace": "linter-example:provideLinter"
},
"repository": "https://github.com/atom/linter-example",
"license": "MIT",
"engines": {
"atom": ">=1.0.0 <2.0.0"
},
"dependencies": {
"atom-linter": "^8.0.0",
"atom-package-deps": "^4.0.1"
},
"activationHooks": [
"language-c:grammar-used"
],
"providedServices": {
"linter": {
"versions": {
"2.0.0": "provideLinter"
}
}
}
}

0 comments on commit e646923

Please sign in to comment.