Skip to content

Commit

Permalink
integrate eslint with prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
jlmakes committed Oct 8, 2017
1 parent 292605b commit 73b8e01
Show file tree
Hide file tree
Showing 7 changed files with 138 additions and 180 deletions.
90 changes: 45 additions & 45 deletions .eslintrc.json
@@ -1,47 +1,47 @@
{
"env": {
"es6": true,
"amd": true,
"browser": true,
"mocha": true,
"node": true
},
"extends": "eslint:recommended",
"parserOptions": {
"sourceType": "module"
},
"globals": {
"describe": true,
"it": true,
"expect": true,
"sinon": true
},
"rules": {
"array-bracket-spacing": [2, "never", { "arraysInArrays": true }],
"arrow-spacing": 2,
"block-spacing": 2,
"brace-style": [2, "1tbs", { "allowSingleLine": true }],
"comma-dangle": [2, "always-multiline"],
"comma-spacing": [2, { "before": false, "after": true }],
"eol-last": [2, "always"],
"indent": [2, "tab", { "SwitchCase": 1 }],
"key-spacing": 2,
"keyword-spacing": 2,
"no-cond-assign": 2,
"no-const-assign": 2,
"no-class-assign": 2,
"no-this-before-super": 2,
"no-trailing-spaces": 2,
"no-unused-vars": 1,
"no-var": 2,
"no-mixed-spaces-and-tabs": [2, "smart-tabs"],
"object-curly-spacing": [2, "always"],
"object-shorthand": [2, "always"],
"semi": [2, "never"],
"space-before-blocks": [2, "always"],
"space-before-function-paren": [2, "always"],
"space-in-parens": [2, "never"],
"quote-props": [2, "as-needed"],
"quotes": [2, "single"]
}
"env": {
"es6": true,
"amd": true,
"browser": true,
"mocha": true,
"node": true
},
"extends": "eslint:recommended",
"parserOptions": {
"sourceType": "module"
},
"globals": {
"describe": true,
"it": true,
"expect": true,
"sinon": true
},
"rules": {
"array-bracket-spacing": [2, "never", { "arraysInArrays": true }],
"arrow-spacing": 2,
"block-spacing": 2,
"brace-style": [2, "1tbs", { "allowSingleLine": true }],
"comma-dangle": [2, "always-multiline"],
"comma-spacing": [2, { "before": false, "after": true }],
"eol-last": [2, "always"],
"indent": [2, "tab", { "SwitchCase": 1 }],
"key-spacing": 2,
"keyword-spacing": 2,
"no-cond-assign": 2,
"no-const-assign": 2,
"no-class-assign": 2,
"no-this-before-super": 2,
"no-trailing-spaces": 2,
"no-unused-vars": 1,
"no-var": 2,
"no-mixed-spaces-and-tabs": [2, "smart-tabs"],
"object-curly-spacing": [2, "always"],
"object-shorthand": [2, "always"],
"semi": [2, "never"],
"space-before-blocks": [2, "always"],
"space-before-function-paren": [2, "always"],
"space-in-parens": [2, "never"],
"quote-props": [2, "as-needed"],
"quotes": [2, "single"]
}
}
55 changes: 23 additions & 32 deletions bower.json
@@ -1,34 +1,25 @@
{
"name": "rematrix",
"description": "Matrix transformations made easy",
"main": [
"dist/rematrix.js"
],
"repository": "jlmakes/rematrix",
"moduleType": [
"amd",
"node",
"globals"
],
"ignore": [
"**/.*",
"coverage",
"src",
"test",
"karma.conf.js",
"package.json",
"rollup.conf.banner.js",
"rollup.conf.js",
"rollup.conf.min.js",
"sauce.conf.js"
],
"keywords": [
"css",
"matrix",
"transform"
],
"authors": [
"Julian Lloyd <me@jlmak.es>"
],
"license": "MIT"
"name": "rematrix",
"description": "Matrix transformations made easy",
"main": ["dist/rematrix.js"],
"repository": {
"type": "git",
"url": "https://github.com/jlmakes/rematrix.git"
},
"moduleType": ["amd", "node", "globals"],
"ignore": [
"**/.*",
"coverage",
"src",
"test",
"karma.conf.js",
"package.json",
"rollup.conf.banner.js",
"rollup.conf.js",
"rollup.conf.min.js",
"sauce.conf.js"
],
"keywords": ["css", "matrix", "transform"],
"authors": ["Julian Lloyd <me@jlmak.es>"],
"license": "MIT"
}
16 changes: 3 additions & 13 deletions karma.conf.js
@@ -1,16 +1,11 @@
process.env.PHANTOMJS_BIN = './node_modules/phantomjs-prebuilt/bin/phantomjs'

const rollupPlugins = [
require('rollup-plugin-buble')(),
]
const rollupPlugins = [require('rollup-plugin-buble')()]

if (!process.env.TRAVIS || process.env.COVERAGE) {
const istanbul = require('rollup-plugin-istanbul')
const config = {
exclude: [
'test/**',
'**/node_modules/**',
],
exclude: ['test/**', '**/node_modules/**'],
instrumenterConfig: {
embedSource: true,
},
Expand All @@ -26,9 +21,7 @@ module.exports = function (karma) {
'test/main.spec.js': ['rollup'],
},

files: [
{ pattern: 'test/main.spec.js', watched: false },
],
files: [{ pattern: 'test/main.spec.js', watched: false }],

rollupPreprocessor: {
plugins: rollupPlugins,
Expand All @@ -49,7 +42,6 @@ module.exports = function (karma) {
})

if (process.env.TRAVIS) {

if (process.env.COVERAGE) {
karma.set({
autoWatch: false,
Expand All @@ -60,7 +52,6 @@ module.exports = function (karma) {
},
reporters: ['mocha', 'coverage', 'coveralls'],
})

} else {
const customLaunchers = require('./sauce.conf')
karma.set({
Expand All @@ -79,7 +70,6 @@ module.exports = function (karma) {
},
})
}

} else {
karma.set({
browsers: ['PhantomJS'],
Expand Down
96 changes: 45 additions & 51 deletions package.json
@@ -1,53 +1,47 @@
{
"name": "rematrix",
"version": "0.2.0",
"description": "Matrix transformations made easy",
"main": "dist/rematrix.js",
"module": "dist/rematrix.es.js",
"jsnext:main": "dist/rematrix.es.js",
"files": [
"dist"
],
"scripts": {
"prebuild": "rm -rf dist/*",
"build": "npm run bundle && npm run bundle:min",
"bundle": "rollup -c rollup.conf.js",
"bundle:min": "rollup -c rollup.conf.min.js",
"lint": "eslint src test",
"pretest": "rm -rf .ignore/coverage/**/ && npm run lint",
"test": "karma start",
"testing": "npm test -- --no-single-run",
"coverage": "COVERAGE=true karma start"
},
"repository": "jlmakes/rematrix",
"keywords": [
"css",
"matrix",
"transform"
],
"bugs": {
"url": "https://github.com/jlmakes/rematrix/issues"
},
"devDependencies": {
"chai": "^3.5.0",
"eslint": "^3.11.0",
"karma": "^1.3.0",
"karma-coverage": "^1.1.1",
"karma-coveralls": "^1.1.2",
"karma-mocha": "^1.3.0",
"karma-mocha-reporter": "^2.2.0",
"karma-phantomjs-launcher": "^1.0.2",
"karma-rollup-preprocessor": "^5.0.1",
"karma-sauce-launcher": "^1.1.0",
"karma-sinon-chai": "^1.2.4",
"mocha": "^3.1.2",
"rollup": "^0.48.2",
"rollup-plugin-buble": "^0.14.0",
"rollup-plugin-istanbul": "^1.1.0",
"rollup-plugin-uglify": "^1.0.1",
"sinon": "^1.17.6",
"sinon-chai": "^2.8.0"
},
"author": "Julian Lloyd <rematrix@jlmak.es>",
"license": "MIT"
"name": "rematrix",
"version": "0.2.0",
"description": "Matrix transformations made easy",
"main": "dist/rematrix.js",
"module": "dist/rematrix.es.js",
"jsnext:main": "dist/rematrix.es.js",
"files": ["dist"],
"scripts": {
"prebuild": "rm -rf dist/*",
"build": "npm run bundle && npm run bundle:min",
"bundle": "rollup -c rollup.conf.js",
"bundle:min": "rollup -c rollup.conf.min.js",
"lint": "eslint src test",
"pretest": "rm -rf .ignore/coverage/**/ && npm run lint",
"test": "karma start",
"testing": "npm test -- --no-single-run",
"coverage": "COVERAGE=true karma start"
},
"repository": "jlmakes/rematrix",
"keywords": ["css", "matrix", "transform"],
"bugs": {
"url": "https://github.com/jlmakes/rematrix/issues"
},
"devDependencies": {
"chai": "^3.5.0",
"eslint": "^3.11.0",
"karma": "^1.3.0",
"karma-coverage": "^1.1.1",
"karma-coveralls": "^1.1.2",
"karma-mocha": "^1.3.0",
"karma-mocha-reporter": "^2.2.0",
"karma-phantomjs-launcher": "^1.0.2",
"karma-rollup-preprocessor": "^5.0.1",
"karma-sauce-launcher": "^1.1.0",
"karma-sinon-chai": "^1.2.4",
"mocha": "^3.1.2",
"rollup": "^0.48.2",
"rollup-plugin-buble": "^0.14.0",
"rollup-plugin-istanbul": "^1.1.0",
"rollup-plugin-uglify": "^1.0.1",
"sinon": "^1.17.6",
"sinon-chai": "^2.8.0"
},
"author": "Julian Lloyd <rematrix@jlmak.es>",
"license": "MIT"
}
4 changes: 1 addition & 3 deletions rollup.conf.js
Expand Up @@ -4,9 +4,7 @@ import banner from './rollup.conf.banner'
export default {
banner,
input: 'src/index.js',
plugins: [
buble(),
],
plugins: [buble()],
output: [
{ file: 'dist/rematrix.js', format: 'umd', name: 'Rematrix' },
{ file: 'dist/rematrix.es.js', format: 'es' },
Expand Down

0 comments on commit 73b8e01

Please sign in to comment.