Skip to content
This repository has been archived by the owner on Feb 24, 2022. It is now read-only.

Commit

Permalink
Clean package.json and .eslintrc
Browse files Browse the repository at this point in the history
  • Loading branch information
pdehaan committed Jun 29, 2016
1 parent c38a2e6 commit 2697872
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 35 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
coverage
8 changes: 4 additions & 4 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,15 @@
"no-invalid-this": 0,
"no-magic-numbers": 0,
"no-negated-condition": 0,
"no-shadow": 0, // TODO: Change to `1`?
"no-shadow": 1,
"no-trailing-spaces": [2, {"skipBlankLines": false}],
"no-undef": 2,
"no-underscore-dangle": 0,
"no-unused-vars": [2, {"vars": "all", "args": "none"}],
"no-warning-comments": 0, // TODO: Change to `1`?
"object-curly-spacing": [2, "never"],
"no-var": 2,
"prefer-const": 0, // TODO: Change to `1`?
"no-warning-comments": 1,
"object-curly-spacing": [2, "never"],
"prefer-const": 1,
"prefer-reflect": 0,
"quotes": [2, "single", "avoid-escape"],
"semi": [2, "always"],
Expand Down
4 changes: 2 additions & 2 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ machine:
COVERALLS_REPO_TOKEN: Vf8OYui1kwrD3HoOBefD4K0sbgpOVz7JO

node:
version: 6.2
version: 6.2

dependencies:
override:
- npm install --only=dev
- npm update
- sudo apt-get update && sudo apt-get install libpango1.0-0 && sudo apt-get install libpangocairo-1.0-0 && sudo apt-get install firefox
- sudo apt-get update && sudo apt-get install libpango1.0-0 libpangocairo-1.0-0 firefox

test:
post:
Expand Down
2 changes: 1 addition & 1 deletion karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ module.exports = function(config) {
postLoaders: [{
test: /\.js$/,
loader: 'istanbul-instrumenter',
include: [path.join(__dirname, '/parser.js')]
include: [path.join(__dirname, 'parser.js')]
}]
},
externals: {
Expand Down
46 changes: 23 additions & 23 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,45 +1,25 @@
{
"name": "page-metadata-parser",
"description": "A JavaScript library for parsing metadata in a Web Page.",
"version": "0.2.0",
"description": "A Javascript library for parsing metadata in a Web Page.",
"main": "parser.js",
"scripts": {
"test:lint": "eslint ./*.js ./tests/*.js",
"test:karma": "karma start",
"test:mocha": "./node_modules/istanbul/lib/cli.js cover _mocha --report lcovonly -- tests/*.test.js -R spec",
"test": "npm-run-all test:*",
"tdd": "npm run test:karma -- --no-single-run",
"cover": "cat ./coverage/lcov/lcov.info | coveralls"
},
"repository": {
"type": "git",
"url": "git+https://github.com/mozilla/page-metadata-parser.git"
},
"keywords": [
"page",
"metadata",
"parser"
],
"author": "Jared Kerim",
"license": "MPL-2.0",
"bugs": {
"url": "https://github.com/mozilla/page-metadata-parser/issues"
},
"homepage": "https://github.com/mozilla/page-metadata-parser#readme",
"dependencies": {
"fathom-web": "^1.1.0",
"karma-chrome-launcher": "^1.0.1",
"wu": "^2.1.0"
},
"devDependencies": {
"chai": "^3.5.0",
"coveralls": "^2.11.9",
"eslint": "^2.13.1",
"eslint-plugin-mozilla": "0.0.3",
"eslint-plugin-mozilla": "^0.0.3",
"istanbul": "^0.4.4",
"istanbul-instrumenter-loader": "^0.2.0",
"jsdom": "^9.2.1",
"karma": "^1.0.0",
"karma-chrome-launcher": "^1.0.1",
"karma-coverage": "^1.0.0",
"karma-firefox-launcher": "^1.0.0",
"karma-mocha": "^1.0.1",
Expand All @@ -49,5 +29,25 @@
"mocha": "^2.5.3",
"npm-run-all": "^2.2.0",
"webpack": "^1.13.1"
},
"homepage": "https://github.com/mozilla/page-metadata-parser#readme",
"keywords": [
"page",
"metadata",
"parser"
],
"license": "MPL-2.0",
"main": "parser.js",
"repository": {
"type": "git",
"url": "git+https://github.com/mozilla/page-metadata-parser.git"
},
"scripts": {
"cover": "cat ./coverage/lcov/lcov.info | coveralls",
"tdd": "npm run test:karma -- --no-single-run",
"test": "npm-run-all test:*",
"test:karma": "karma start",
"test:lint": "eslint .",
"test:mocha": "istanbul cover _mocha --report lcovonly -- tests/*.test.js -R spec"
}
}
6 changes: 3 additions & 3 deletions parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ const metadataRules = {


function getMetadata(doc) {
let metadata = {};
const metadata = {};

Object.keys(metadataRules).map(metadataKey => {
const metadataRule = metadataRules[metadataKey];
Expand All @@ -87,6 +87,6 @@ function getMetadata(doc) {
}

module.exports = {
metadataRules: metadataRules,
getMetadata: getMetadata
metadataRules,
getMetadata
};
2 changes: 1 addition & 1 deletion tests/getMetadata.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Tests for parse.js
const {assert} = require('chai');
const {getMetadata} = require('../parser.js');
const {getMetadata} = require('../parser');
const {stringToDom} = require('./test-utils');

describe('Get Metadata Tests', function() {
Expand Down
2 changes: 1 addition & 1 deletion tests/metadataRules.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Tests for parse.js
const {assert} = require('chai');
const {metadataRules} = require('../parser.js');
const {metadataRules} = require('../parser');
const {stringToDom} = require('./test-utils');

function buildHTML(tag) {
Expand Down

0 comments on commit 2697872

Please sign in to comment.