Skip to content

Commit 541b06b

Browse files
authored
Merge pull request #352 from creativecommons/auto-format-code
Format all code using Prettier and eslint
2 parents 99d4ccc + 599b0e8 commit 541b06b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+3151
-2942
lines changed

.eslintrc.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,23 @@ module.exports = {
88
browser: true,
99
},
1010

11+
ignorePatterns: ['docs/'],
12+
1113
rules: {
1214
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
1315
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
1416
indent: ['error', 2],
15-
'comma-dangle': ["error", "always-multiline"],
17+
'comma-dangle': ['error', 'always-multiline'],
1618
'space-before-function-paren': ['warn', 'never'],
1719
'vue/require-default-prop': 'off',
1820
'vue/no-v-html': 'off',
19-
'vue/html-indent': ['error', 2],
2021
},
2122

2223
parserOptions: {
2324
parser: 'babel-eslint',
2425
},
2526

2627
overrides: [
27-
2828
{
2929
files: [
3030
'**/__tests__/*.{j,t}s?(x)',
@@ -41,6 +41,6 @@ module.exports = {
4141
'@vue/standard',
4242
'prettier',
4343
'prettier/vue',
44-
"plugin:cypress/recommended"
44+
'plugin:cypress/recommended',
4545
],
46-
}
46+
};

.prettierignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
docs/

.prettierrc

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
singleQuote: true,
3+
semi: true,
4+
trailingComma: 'all',
5+
}

postcss.config.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const IN_PRODUCTION = process.env.NODE_ENV === 'production'
1+
const IN_PRODUCTION = process.env.NODE_ENV === 'production';
22

33
module.exports = {
44
plugins: [
@@ -9,12 +9,12 @@ module.exports = {
99
const contentWithoutStyleBlocks = content.replace(
1010
/<style[^]+?<\/style>/gi,
1111
'',
12-
)
12+
);
1313
return (
1414
contentWithoutStyleBlocks.match(
1515
/[A-Za-z0-9-_/:]*[A-Za-z0-9-_/]+/g,
1616
) || []
17-
)
17+
);
1818
},
1919
safelist: [
2020
/-(leave|enter|appear)(|-(to|from|active))$/,
@@ -37,4 +37,4 @@ module.exports = {
3737
],
3838
}),
3939
],
40-
}
40+
};

prettier-config.js

-4
This file was deleted.

0 commit comments

Comments
 (0)