Skip to content

Commit

Permalink
Use Prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark committed Apr 5, 2020
1 parent 491d194 commit f2ce377
Show file tree
Hide file tree
Showing 14 changed files with 566 additions and 56 deletions.
2 changes: 1 addition & 1 deletion .coveralls.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
service_name: travis-pro
repo_token: M4wV7sgz17G1ZPNe7Tmpl8x2VXcRzhrFl
repo_token: M4wV7sgz17G1ZPNe7Tmpl8x2VXcRzhrFl
5 changes: 5 additions & 0 deletions .huskyrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
hooks: {
'pre-commit': 'pretty-quick --staged',
},
};
7 changes: 6 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
dist/
dist/
package*.json
.gitignore
.npmrc
.prettierignore
coverage/
14 changes: 0 additions & 14 deletions .prettierrc

This file was deleted.

4 changes: 4 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
singleQuote: true,
tabWidth: 4,
};
2 changes: 1 addition & 1 deletion .release-it.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ module.exports = {
},
hooks: {
'before:init': ['npm test'],
'after:bump': 'npm run build && npm run banner'
'after:bump': 'npm run build && npm run banner',
},
};
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ element.addEventListener('edit', (e) => {

Of course, all of the other [events supported by any HTMLElement](https://html.spec.whatwg.org/multipage/webappapis.html#globaleventhandlers) are still available.


## Styling

An `editing` attribute is applied to the element when the text inside of the element is in focus. So you
Expand All @@ -71,4 +70,4 @@ If you would like for line breaks or any other formatting to be respected, just
content-editable {
white-space: pre;
}
```
```
12 changes: 6 additions & 6 deletions karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
module.exports = function(config) {
module.exports = function (config) {
config.set({
files: ['tests/**/*.ts', 'src/**/*.ts'],
preprocessors: {
'**/*.ts': ['karma-typescript', 'coverage']
'**/*.ts': ['karma-typescript', 'coverage'],
},
karmaTypescriptConfig: {
compilerOptions: {
module: 'commonjs',
sourceMap: true,
target: 'es6'
target: 'es6',
},
exclude: ['node_modules']
exclude: ['node_modules'],
},
coverageReporter: {
dir: 'coverage/',
type: 'lcovonly',
subdir: '.'
subdir: '.',
},
reporters: ['progress', 'coverage'],
frameworks: ['mocha', 'karma-typescript'],
Expand All @@ -25,6 +25,6 @@ module.exports = function(config) {
browsers: ['ChromeHeadless'],
autoWatch: true,
singleRun: true,
concurrency: Infinity
concurrency: Infinity,
});
};
Loading

0 comments on commit f2ce377

Please sign in to comment.