This repository has been archived by the owner on Jul 16, 2024. It is now read-only.
forked from kartotherian/kartotherian
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add linting according to the eslint kartotherian rules. Only test node version 6. Version 4 is fairly old, and does not support the linting rules (mainly the trailing comma pieces) and Mapnik only supports up to node 6.9.4 for now.
- Loading branch information
Showing
20 changed files
with
965 additions
and
1,003 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
module.exports = { | ||
extends: 'kartotherian', | ||
env: { | ||
node: true, | ||
es6: true, | ||
browser: false, | ||
}, | ||
rules: { | ||
'comma-dangle': [ | ||
'error', | ||
{ | ||
arrays: 'always-multiline', | ||
objects: 'always-multiline', | ||
imports: 'always-multiline', | ||
exports: 'always-multiline', | ||
// Dangling commas are unsupported in node | ||
functions: 'never', | ||
}, | ||
], | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* eslint-env node */ | ||
module.exports = function Gruntfile(grunt) { | ||
grunt.loadNpmTasks('grunt-contrib-watch'); | ||
grunt.loadNpmTasks('grunt-eslint'); | ||
grunt.loadNpmTasks('grunt-mocha-test'); | ||
|
||
grunt.initConfig({ | ||
eslint: { | ||
code: { | ||
src: [ | ||
'**/*.js', | ||
'!node_modules/**', | ||
'!vendor/**', | ||
'!lib/**', | ||
'!coverage/**', | ||
], | ||
}, | ||
}, | ||
mochaTest: { | ||
test: { | ||
options: { | ||
reporter: 'spec', | ||
}, | ||
src: ['test/**/*.js'], | ||
}, | ||
}, | ||
}); | ||
|
||
grunt.registerTask('lint', 'eslint'); | ||
grunt.registerTask('test', ['lint', 'mochaTest']); | ||
grunt.registerTask('default', 'test'); | ||
}; |
Oops, something went wrong.