Skip to content

Commit

Permalink
Update to prettier 2.x.x. Update peer dep range. (#154)
Browse files Browse the repository at this point in the history
  • Loading branch information
tclindner authored Apr 12, 2020
1 parent 8da2940 commit 6c77da4
Show file tree
Hide file tree
Showing 11 changed files with 41 additions and 42 deletions.
24 changes: 12 additions & 12 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,25 @@ module.exports = {
node,
style,
variables,
prettier
prettier,
],
plugins: ['jest', 'prettier'],
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module'
sourceType: 'module',
},
env: {
node: true
node: true,
},
rules: {
strict: 'error'
strict: 'error',
},
overrides: [
{
files: ['**/*.spec.js', '**/*.test.js', '**/tests-*.js'],
env: {
jest: true,
mocha: true
mocha: true,
},
rules: {
'array-bracket-newline': 'off',
Expand All @@ -46,8 +46,8 @@ module.exports = {
'error',
{
fn: 'test',
withinDescribe: 'test'
}
withinDescribe: 'test',
},
],
'jest/expect-expect': 'error',
'jest/no-alias-methods': 'error',
Expand Down Expand Up @@ -107,9 +107,9 @@ module.exports = {
{blankLine: 'any', prev: '*', next: 'export'},
{blankLine: 'any', prev: '*', next: 'cjs-export'},
{blankLine: 'any', prev: 'cjs-import', next: '*'},
{blankLine: 'any', prev: 'cjs-import', next: 'cjs-import'}
]
}
}
]
{blankLine: 'any', prev: 'cjs-import', next: 'cjs-import'},
],
},
},
],
};
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-config-tc",
"version": "11.0.0",
"version": "12.0.0",
"description": "ESLint shareable config for JavaScript projects",
"keywords": [
"eslintconfig",
Expand Down Expand Up @@ -33,17 +33,17 @@
"test": "jest"
},
"devDependencies": {
"eslint": "^6.7.2",
"eslint": "^6.8.0",
"eslint-formatter-pretty": "^3.0.1",
"eslint-plugin-eslint-comments": "^3.1.2",
"eslint-plugin-import": "^2.20.2",
"eslint-plugin-jest": "^23.8.2",
"eslint-plugin-prettier": "^3.1.1",
"eslint-plugin-prettier": "^3.1.2",
"is-plain-obj": "^2.1.0",
"jest": "^25.3.0",
"npm-package-json-lint": "^4.6.0",
"npm-package-json-lint-config-tc": "^3.0.0",
"prettier": "^1.19.1"
"prettier": "^2.0.4"
},
"dependencies": {
"eslint-config-airbnb-base": "^14.1.0",
Expand All @@ -55,7 +55,7 @@
"eslint-plugin-import": "^2.0.0",
"eslint-plugin-jest": "^23.0.0",
"eslint-plugin-prettier": "^3.0.0",
"prettier": "^1.0.0"
"prettier": "^2.0.0"
},
"engines": {
"node": ">=10.0.0",
Expand Down
4 changes: 2 additions & 2 deletions rules/best-practices.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ module.exports = {
'no-unmodified-loop-condition': 'error',
'no-unused-expressions': 'error',
'no-useless-call': 'error',
'no-warning-comments': 'warn'
}
'no-warning-comments': 'warn',
},
};
4 changes: 2 additions & 2 deletions rules/errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ module.exports = {
'no-constant-condition': 'error',
'no-prototype-builtins': 'error',
'no-setter-return': 'error',
'require-atomic-updates': 'error'
}
'require-atomic-updates': 'error',
},
};
4 changes: 2 additions & 2 deletions rules/es6.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ module.exports = {
'max-classes-per-file': 'error',
'no-duplicate-imports': 'error',
'no-useless-rename': 'error',
'prefer-const': 'error'
}
'prefer-const': 'error',
},
};
4 changes: 2 additions & 2 deletions rules/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ module.exports = {
rules: {
'callback-return': 'error',
'handle-callback-err': 'error',
'no-mixed-requires': 'error'
}
'no-mixed-requires': 'error',
},
};
9 changes: 4 additions & 5 deletions rules/prettier.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ module.exports = {
'error',
{
bracketSpacing: false,
endOfLine: 'lf',
printWidth: 124,
singleQuote: true
}
]
}
singleQuote: true,
},
],
},
};
10 changes: 5 additions & 5 deletions rules/style.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ module.exports = {
'error',
{
min: 1,
max: 40
}
max: 40,
},
],
'line-comment-position': ['error', {position: 'above'}],
'max-depth': ['error', 4],
Expand Down Expand Up @@ -38,10 +38,10 @@ module.exports = {
{blankLine: 'always', prev: '*', next: 'cjs-export'},
{blankLine: 'any', prev: 'cjs-export', next: 'cjs-export'},
{blankLine: 'any', prev: 'cjs-import', next: '*'},
{blankLine: 'any', prev: 'cjs-import', next: 'cjs-import'}
{blankLine: 'any', prev: 'cjs-import', next: 'cjs-import'},
],
'prefer-exponentiation-operator': 'error',
'sort-vars': 'error',
'spaced-comment': ['error', 'always']
}
'spaced-comment': ['error', 'always'],
},
};
4 changes: 2 additions & 2 deletions rules/variables.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {
rules: {
'no-undefined': 'error',
'no-use-before-define': 'error'
}
'no-use-before-define': 'error',
},
};
2 changes: 1 addition & 1 deletion test/tests.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ describe('eslint config tests', () => {
const expectedErrorColumnNum = 1;
const linter = new eslint.CLIEngine({
useEslintrc: false,
baseConfig: eslintConfig
baseConfig: eslintConfig,
});

const errors = linter.executeOnText(code).results[0].messages;
Expand Down

0 comments on commit 6c77da4

Please sign in to comment.