Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eslint update #21

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 14 additions & 8 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ rules:
# Disallow warning comments
no-warning-comments:
- 1
- terms
-
terms:
- todo
- fixme
location
- anywhere
location: anywhere

# Warns when variables are defined but never used
no-unused-vars: 1
Expand Down Expand Up @@ -114,7 +114,11 @@ rules:
space-after-keywords:
- 2
- always
- checkFunctionKeyword: true

# Disallow a space before function parenthesis
space-before-function-paren:
- 2
- never

# Enforces quoted property names
quote-props:
Expand Down Expand Up @@ -146,10 +150,12 @@ rules:
- 2
- single

# Enforces space inside of brackets (except property name)
space-in-brackets:
# Enforces space inside of array brackets
array-bracket-spacing:
- 2
- always
- propertyName: false
singleValue: false

# Enforces spaces inside of curly braces in objects
object-curly-spacing:
- 2
- always
13 changes: 9 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
# Configuration options are documented at:
# http://docs.travis-ci.com/user/languages/javascript-with-nodejs/
language: node_js
node_js:
- "0.10"
- node
- '0.10'
- '0.12'
- '4.0'
- '4.1'
- '5.0'
- iojs
before_install:
before_script:
- npm install -g bower
- cd tests
- cd test
- bower install -f
- cd ..
14 changes: 7 additions & 7 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ var parseJSON = function parseJSON(data, filename) {
//////////////////////////////
colors = fileReturn.match(/"(#([0-9a-f]{3}){1,2})"/g);
if (colors) {
colors.forEach(function (color) {
colors.forEach(function(color) {
fileReturn = fileReturn.replace(color, color.slice(1, -1));
});
}
Expand All @@ -200,7 +200,7 @@ var parseJSON = function parseJSON(data, filename) {
//////////////////////////////
colors = fileReturn.match(/"(rgb|rgba)\((\d{1,3}), (\d{1,3}), (\d{1,3})\)"/g);
if (colors) {
colors.forEach(function (color) {
colors.forEach(function(color) {
fileReturn = fileReturn.replace(color, color.slice(1, -1));
});
}
Expand All @@ -213,7 +213,7 @@ var parseJSON = function parseJSON(data, filename) {
//////////////////////////////
colors = fileReturn.match(/"(hsl|hsla)\((\d{1,3}), (\d{1,3}), (\d{1,3})\)"/g);
if (colors) {
colors.forEach(function (color) {
colors.forEach(function(color) {
fileReturn = fileReturn.replace(color, color.slice(1, -1));
});
}
Expand Down Expand Up @@ -306,9 +306,9 @@ var importer = function importer(uri, prev, done) {

if (isRealFile) {
file = path.resolve(path.dirname(prev), makeFsPath(uri));
raf(uri, file, function (err, data) {
raf(uri, file, function(err, data) {
if (err) {
console.log(err.toString());
console.log(err.toString()); // eslint-disable-line no-console
done({});
}
else {
Expand All @@ -317,9 +317,9 @@ var importer = function importer(uri, prev, done) {
});
}
else {
raf(uri, process.cwd(), function (err, data) {
raf(uri, process.cwd(), function(err, data) {
if (err) {
console.log(err.toString());
console.log(err.toString()); // eslint-disable-line no-console
done({});
}
else {
Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Custom importer for node-sass that only allows a file to be imported once. Includes additional import bonuses including importing CSS files directly into Sass, automagic Bower imports, the ability to import an `index` file from within a folder name, and the ability to import JSON and YAML files as Sass maps. Inspired by Eyeglass.",
"main": "index.js",
"scripts": {
"test": "cd tests && ../node_modules/.bin/mocha ./"
"test": "mocha"
},
"repository": {
"type": "git",
Expand All @@ -24,8 +24,9 @@
},
"homepage": "https://github.com/at-import/node-sass-import-once",
"devDependencies": {
"eslint": "^0.18.0",
"mocha": "^2.2.1",
"eslint": "^1.10.3",
"js-yaml": "^3.5.3",
"mocha": "^2.4.5",
"node-sass": "^3.0.0-beta.5",
"should": "^5.2.0"
},
Expand Down
3 changes: 3 additions & 0 deletions test/.bowerrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"directory": "../bower_components"
}
2 changes: 1 addition & 1 deletion tests/bower.json → test/bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
],
"license": "MIT",
"devDependencies": {
"bootstrap": "~3.3.4",
"bootstrap": "3.3.4",
"sass-toolkit": "~2.9.0",
"breakpoint-sass": "~2.5.0"
}
Expand Down
File renamed without changes.
Loading