Skip to content

Commit c543b83

Browse files
authored
feat(prettier): 2.7 support for cache (#56)
1 parent e743d74 commit c543b83

4,261 files changed

Lines changed: 102807 additions & 143 deletions

File tree

Some content is hidden

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

.editorconfig

Lines changed: 42 additions & 103 deletions
Original file line numberDiff line numberDiff line change
@@ -1,115 +1,49 @@
1-
# EditorConfig is awesome: http://EditorConfig.org
2-
3-
# https://github.com/jokeyrhyme/standard-editorconfig
4-
51
# top-most EditorConfig file
62
root = true
73

8-
# defaults
4+
# All files
95
[*]
106
charset = utf-8
117
end_of_line = lf
8+
indent_size = 2
9+
indent_style = space
1210
insert_final_newline = true
1311
trim_trailing_whitespace = true
1412

1513
# Solidity
16-
[*.{sol,solidity}]
17-
indent_size = 4
18-
indent_style = space
19-
20-
21-
# Bazel: https://bazel.build/
22-
# https://github.com/bazelbuild/buildtools/blob/master/BUILD.bazel
23-
[*.{bazel,bzl}]
14+
# https://github.com/sambacha/prettier-config-solidity
15+
[*.sol]
2416
indent_size = 4
2517
indent_style = space
2618

27-
# CSS
28-
# https://google.github.io/styleguide/htmlcssguide.xml#General_Formatting_Rules
29-
# http://cssguidelin.es/#syntax-and-formatting
30-
[*.css]
31-
indent_size = 2
32-
indent_style = space
33-
trim_trailing_whitespace = true
34-
35-
# GNU make
36-
# https://www.gnu.org/software/make/manual/html_node/Recipe-Syntax.html
37-
[Makefile]
38-
indent_style = tab
39-
40-
# Go
41-
# https://golang.org/cmd/gofmt/
42-
[{go.mod,*.go}]
43-
indent_style = tab
44-
45-
# GraphQL
46-
# https://graphql.org/learn/
47-
# https://prettier.io
48-
[*.graphql]
49-
indent_size = 2
50-
indent_style = space
19+
# Markdown
20+
[*.{md,adoc,asciidoc}]
21+
charset = utf-8
22+
end_of_line = lf
23+
insert_final_newline = true
24+
trim_trailing_whitespace = false
5125

52-
# HTML
53-
# https://google.github.io/styleguide/htmlcssguide.xml#General_Formatting_Rules
54-
[*.{htm,html}]
55-
indent_size = 2
26+
# Match nix files, set indent to spaces with width of two
27+
[*.nix]
5628
indent_style = space
57-
trim_trailing_whitespace = true
58-
59-
# Java
60-
# https://google.github.io/styleguide/javaguide.html#s4.2-block-indentation
61-
[*.java]
6229
indent_size = 2
63-
indent_style = space
6430

6531
# JavaScript, JSON, JSX, JavaScript Modules, TypeScript
6632
# https://github.com/feross/standard
6733
# https://prettier.io
68-
[*.{cjs,js,json,jsx,mjs,ts,tsx}]
69-
indent_size = 2
70-
indent_style = space
71-
72-
# Kotlin
73-
# https://android.github.io/kotlin-guides/style.html#indentation
74-
[*.{kt,kts}]
75-
indent_size = 4
76-
indent_style = space
77-
78-
# LESS
79-
# https://github.com/less/less-docs#less-standards
80-
[*.less]
34+
[*.{cjs,js,json,jsx,mjs,ts,tsx,mts,cts}]
8135
indent_size = 2
8236
indent_style = space
8337

84-
# PHP
85-
# http://www.php-fig.org/psr/psr-2/
86-
[*.php]
87-
indent_size = 4
88-
indent_style = space
89-
90-
# Python
91-
# https://www.python.org/dev/peps/pep-0008/#code-lay-out
92-
[*.py]
93-
indent_size = 4
94-
indent_style = space
95-
96-
# Ruby
97-
# http://www.caliban.org/ruby/rubyguide.shtml#indentation
98-
[*.rb]
38+
# TOML
39+
# https://github.com/toml-lang/toml/tree/master/examples
40+
[*.toml]
9941
indent_size = 2
10042
indent_style = space
10143

102-
# Rust
103-
# https://github.com/rust-lang/rust/blob/master/src/doc/style/style/whitespace.md
104-
[*.rs]
105-
indent_size = 4
106-
indent_style = space
107-
insert_final_newline = false
108-
trim_trailing_whitespace = true
109-
110-
# SASS
111-
# https://sass-guidelin.es/#syntax--formatting
112-
[*.{sass,scss}]
44+
# YAML
45+
# http://yaml.org/spec/1.2/2009-07-21/spec.html#id2576668
46+
[*.{yaml,yml}]
11347
indent_size = 2
11448
indent_style = space
11549

@@ -119,20 +53,25 @@ indent_style = space
11953
indent_size = 2
12054
indent_style = space
12155

122-
# Svelte
123-
# https://github.com/sveltejs/svelte/blob/master/.editorconfig
124-
[*.svelte]
125-
indent_size = 2
126-
indent_style = tab
127-
128-
# TOML
129-
# https://github.com/toml-lang/toml/tree/master/examples
130-
[*.toml]
131-
indent_size = 2
132-
indent_style = space
133-
134-
# YAML
135-
# http://yaml.org/spec/1.2/2009-07-21/spec.html#id2576668
136-
[*.{yaml,yml}]
137-
indent_size = 2
138-
indent_style = space
56+
# confg + cfg
57+
[*.{conf,cfg}]
58+
charset = UTF-8
59+
end_of_line = LF
60+
indent_size = 4
61+
indent_style = tab
62+
insert_final_newline = true
63+
tab_width = 4
64+
trim_trailing_whitespace = true
65+
66+
# Match diffs, avoid to trim trailing whitespace
67+
[*.{diff,patch}]
68+
trim_trailing_whitespace = false
69+
70+
# Ignore fixtures and vendored files
71+
[{dist,artifacts,vendor,test/fixtures,tests_config,__snapshot__,}/**]
72+
charset = unset
73+
end_of_line = unset
74+
indent_size = unset
75+
indent_style = unset
76+
insert_final_newline = unset
77+
trim_trailing_spaces = unset

.eslintrc

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,37 @@
22
"env": {
33
"jest": true
44
},
5-
"extends": ["airbnb-base", "prettier"],
65
"globals": {
76
"run_spec": false
7+
},
8+
"extends": ["airbnb-base", "prettier"],
9+
"plugins": ["prettier"],
10+
"rules": {
11+
"prettier/prettier": [
12+
"error",
13+
{
14+
"singleQuote": true,
15+
"trailingComma": "always"
16+
}
17+
],
18+
"max-len": [2, 130, 4],
19+
"no-param-reassign": [
20+
2,
21+
{
22+
"props": false
23+
}
24+
],
25+
"no-plusplus": 0,
26+
"no-underscore-dangle": 0,
27+
"prefer-rest-params": 0,
28+
"comma-dangle": [2,
29+
{
30+
"arrays": "always-multiline",
31+
"objects": "always-multiline",
32+
"imports": "always-multiline",
33+
"exports": "always-multiline",
34+
"functions": "never"
35+
}
36+
]
837
}
938
}

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
out/
2-
dist/
32
coverage/
43
.DS_Store
54
node_modules

.npmignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
test_validate/**/*
2+
jest-test.sh
13
tests_config/
24
.github/
35
test/
@@ -8,10 +10,10 @@ renovate.json
810
test_config/
911
__tests__
1012
.eslint*
11-
.prettier*
1213
!src/*.js
1314
**/__mocks__/**
1415
**/__tests__/**
1516
**/examples/**
1617
**/tasks/**
1718
coverage/
19+
scripts/**

.prettierrc.cjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = require('./src/index');

.prettierrc.json

Lines changed: 0 additions & 16 deletions
This file was deleted.

dist/.editorconfig

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# top-most EditorConfig file
2+
root = true
3+
4+
# All files
5+
[*]
6+
charset = utf-8
7+
end_of_line = lf
8+
indent_size = 2
9+
indent_style = space
10+
insert_final_newline = true
11+
trim_trailing_whitespace = true
12+
13+
# Solidity
14+
# https://github.com/sambacha/prettier-config-solidity
15+
[*.sol]
16+
indent_size = 4
17+
indent_style = space
18+
19+
# Markdown
20+
[*.{md,adoc,asciidoc}]
21+
charset = utf-8
22+
end_of_line = lf
23+
insert_final_newline = true
24+
trim_trailing_whitespace = false
25+
26+
# Match nix files, set indent to spaces with width of two
27+
[*.nix]
28+
indent_style = space
29+
indent_size = 2
30+
31+
# JavaScript, JSON, JSX, JavaScript Modules, TypeScript
32+
# https://github.com/feross/standard
33+
# https://prettier.io
34+
[*.{cjs,js,json,jsx,mjs,ts,tsx,mts,cts}]
35+
indent_size = 2
36+
indent_style = space
37+
38+
# TOML
39+
# https://github.com/toml-lang/toml/tree/master/examples
40+
[*.toml]
41+
indent_size = 2
42+
indent_style = space
43+
44+
# YAML
45+
# http://yaml.org/spec/1.2/2009-07-21/spec.html#id2576668
46+
[*.{yaml,yml}]
47+
indent_size = 2
48+
indent_style = space
49+
50+
# Shell
51+
# https://google.github.io/styleguide/shell.xml#Indentation
52+
[*.{bash,sh,zsh}]
53+
indent_size = 2
54+
indent_style = space
55+
56+
# confg + cfg
57+
[*.{conf,cfg}]
58+
charset = UTF-8
59+
end_of_line = LF
60+
indent_size = 4
61+
indent_style = tab
62+
insert_final_newline = true
63+
tab_width = 4
64+
trim_trailing_whitespace = true
65+
66+
# Match diffs, avoid to trim trailing whitespace
67+
[*.{diff,patch}]
68+
trim_trailing_whitespace = false
69+
70+
# Ignore fixtures and vendored files
71+
[{dist,artifacts,vendor,test/fixtures,tests_config,__snapshot__,}/**]
72+
charset = unset
73+
end_of_line = unset
74+
indent_size = unset
75+
indent_style = unset
76+
insert_final_newline = unset
77+
trim_trailing_spaces = unset

dist/index.d.ts

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
export declare const arrowParens = "always";
2+
export declare const bracketSpacing = true;
3+
export declare const bracketSameLine = true;
4+
export declare const endOfLine = "lf";
5+
export declare const printWidth = 80;
6+
export declare const singleQuote = true;
7+
export declare const tabWidth = 2;
8+
export declare const trailingComma = "all";
9+
export declare const quoteProps = "as-needed";
10+
export declare const semi = true;
11+
export declare const plugins: string[];
12+
export declare const importOrder: string[];
13+
export declare const importOrderSeparation = true;
14+
export declare const importOrderSortSpecifiers = true;
15+
export declare const overrides: {
16+
files: string;
17+
options: {
18+
printWidth: number;
19+
tabWidth: number;
20+
useTabs: boolean;
21+
singleQuote: boolean;
22+
bracketSpacing: boolean;
23+
explicitTypes: string;
24+
};
25+
}[];

0 commit comments

Comments
 (0)