skyltmax_config 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/prettier.js ADDED
@@ -0,0 +1,48 @@
1
+ /** @type {import("prettier").Options} */
2
+ export const config = {
3
+ arrowParens: "avoid",
4
+ bracketSameLine: false,
5
+ bracketSpacing: true,
6
+ embeddedLanguageFormatting: "auto",
7
+ endOfLine: "lf",
8
+ htmlWhitespaceSensitivity: "css",
9
+ insertPragma: false,
10
+ jsxSingleQuote: false,
11
+ printWidth: 120,
12
+ proseWrap: "always",
13
+ quoteProps: "as-needed",
14
+ requirePragma: false,
15
+ semi: false,
16
+ singleAttributePerLine: false,
17
+ singleQuote: false,
18
+ tabWidth: 2,
19
+ trailingComma: "es5",
20
+ useTabs: false,
21
+ overrides: [
22
+ // formatting the package.json with anything other than spaces will cause
23
+ // issues when running install...
24
+ {
25
+ files: ["**/package.json"],
26
+ options: {
27
+ useTabs: false,
28
+ },
29
+ },
30
+ {
31
+ files: ["**/*.mdx"],
32
+ options: {
33
+ // This stinks, if you don't do this, then an inline component on the
34
+ // end of the line will end up wrapping, then the next save Prettier
35
+ // will add an extra line break. Super annoying and probably a bug in
36
+ // Prettier, but until it's fixed, this is the best we can do.
37
+ proseWrap: "preserve",
38
+ htmlWhitespaceSensitivity: "ignore",
39
+ },
40
+ },
41
+ ],
42
+ plugins: ["prettier-plugin-tailwindcss"],
43
+ tailwindAttributes: ["class", "className", ".*[cC]lassName"],
44
+ tailwindFunctions: ["clsx", "cn", "twcn"],
45
+ }
46
+
47
+ // this is for backward compatibility
48
+ export default config
data/reset.d.ts ADDED
@@ -0,0 +1,11 @@
1
+ import "@total-typescript/ts-reset/dom"
2
+ import "@total-typescript/ts-reset/filter-boolean"
3
+
4
+ import "react"
5
+
6
+ declare module "react" {
7
+ // support css variables
8
+ interface CSSProperties {
9
+ [key: `--${string}`]: string | number
10
+ }
11
+ }
data/rubocop.rails.yml ADDED
@@ -0,0 +1,35 @@
1
+ plugins:
2
+ - rubocop-rails
3
+
4
+ AllCops:
5
+ TargetRailsVersion: 8.1
6
+ UseCache: true
7
+ SuggestExtensions: false
8
+ NewCops: disable
9
+
10
+ Rails:
11
+ Enabled: true
12
+
13
+ # When we use these we know what we're doing
14
+ Rails/SkipsModelValidations:
15
+ Enabled: false
16
+
17
+ Rails/ReversibleMigration:
18
+ Enabled: false
19
+
20
+ Rails/OutputSafety:
21
+ Enabled: false
22
+
23
+ Rails/BulkChangeTable:
24
+ Enabled: false
25
+
26
+ Rails/HelperInstanceVariable:
27
+ Enabled: false
28
+
29
+ # buggy atm
30
+ Rails/MatchRoute:
31
+ Enabled: false
32
+
33
+ # buggy atm
34
+ Rails/Delegate:
35
+ Enabled: false
data/rubocop.yml ADDED
@@ -0,0 +1,209 @@
1
+ plugins:
2
+ - rubocop-performance
3
+
4
+ AllCops:
5
+ TargetRubyVersion: 3.4.3
6
+ UseCache: true
7
+ SuggestExtensions: false
8
+ NewCops: disable
9
+ Exclude:
10
+ - "node_modules/**/*"
11
+ - "vendor/**/*"
12
+
13
+ # # Commonly used screens these days easily fit more than 80 characters.
14
+ Layout/LineLength:
15
+ Max: 120
16
+
17
+ # Too short methods lead to extraction of single-use methods, which can make
18
+ # the code easier to read (by naming things), but can also clutter the class
19
+ Metrics/MethodLength:
20
+ Enabled: false
21
+
22
+ # The guiding principle of classes is SRP, SRP can't be accurately measured by LoC
23
+ Metrics/ClassLength:
24
+ Enabled: false
25
+
26
+ Metrics/AbcSize:
27
+ Enabled: false
28
+
29
+ Metrics/CyclomaticComplexity:
30
+ Enabled: false
31
+
32
+ Metrics/PerceivedComplexity:
33
+ Enabled: false
34
+
35
+ Metrics/ParameterLists:
36
+ Enabled: false
37
+
38
+ Metrics/ModuleLength:
39
+ Enabled: false
40
+
41
+ Metrics/BlockLength:
42
+ Enabled: false
43
+
44
+ # Mixing the styles looks just silly.
45
+ Style/HashSyntax:
46
+ EnforcedStyle: ruby19_no_mixed_keys
47
+
48
+ # Single quotes being faster is hardly measurable and only affects parse time.
49
+ # Enforcing double quotes reduces the times where you need to change them
50
+ # when introducing an interpolation. Use single quotes only if their semantics
51
+ # are needed.
52
+ Style/StringLiterals:
53
+ EnforcedStyle: double_quotes
54
+
55
+ Style/StringLiteralsInInterpolation:
56
+ EnforcedStyle: double_quotes
57
+
58
+ # We do not need to support Ruby 1.9, so this is good to use.
59
+ Style/SymbolArray:
60
+ Enabled: true
61
+
62
+ # String#% is by far the least verbose and only object oriented variant.
63
+ Style/FormatString:
64
+ EnforcedStyle: percent
65
+
66
+ Style/FormatStringToken:
67
+ Enabled: false
68
+
69
+ # Fail is an alias of raise. Avoid aliases, it's more cognitive load for no gain.
70
+ # The argument that fail should be used to abort the program is wrong too,
71
+ # there's Kernel#abort for that.
72
+ Style/SignalException:
73
+ EnforcedStyle: only_raise
74
+
75
+ # { ... } for multi-line blocks is okay, follow Weirichs rule instead:
76
+ # https://web.archive.org/web/20140221124509/http://onestepback.org/index.cgi/Tech/Ruby/BraceVsDoEnd.rdoc
77
+ Style/BlockDelimiters:
78
+ Enabled: false
79
+
80
+ # do / end blocks should be used for side effects,
81
+ # methods that run a block for side effects and have
82
+ # a useful return value are rare, assign the return
83
+ # value to a local variable for those cases.
84
+ Style/MethodCalledOnDoEndBlock:
85
+ Enabled: true
86
+
87
+ Style/Documentation:
88
+ Enabled: false
89
+
90
+ Style/MethodDefParentheses:
91
+ Enabled: true
92
+
93
+ Style/TrailingCommaInHashLiteral:
94
+ EnforcedStyleForMultiline: comma
95
+
96
+ Style/TrailingCommaInArrayLiteral:
97
+ EnforcedStyleForMultiline: comma
98
+
99
+ Style/NumericLiterals:
100
+ Enabled: false
101
+
102
+ Style/NumericPredicate:
103
+ EnforcedStyle: comparison
104
+
105
+ Style/ClassAndModuleChildren:
106
+ Enabled: false
107
+
108
+ Style/DoubleNegation:
109
+ Enabled: false
110
+
111
+ Style/AsciiComments:
112
+ Enabled: false
113
+
114
+ Style/HashEachMethods:
115
+ Enabled: false
116
+
117
+ Style/HashTransformKeys:
118
+ Enabled: true
119
+
120
+ Style/HashTransformValues:
121
+ Enabled: true
122
+
123
+ Style/ExponentialNotation:
124
+ Enabled: true
125
+
126
+ Style/RedundantArgument:
127
+ Enabled: false
128
+
129
+ Style/ArgumentsForwarding:
130
+ Enabled: true
131
+
132
+ Style/MultilineBlockChain:
133
+ Enabled: false
134
+
135
+ # Most readable form.
136
+ Layout/HashAlignment:
137
+ EnforcedHashRocketStyle: table
138
+ EnforcedColonStyle: table
139
+
140
+ Layout/BlockEndNewline:
141
+ Enabled: false
142
+
143
+ # No space makes the method definition shorter and differentiates
144
+ # from a regular assignment.
145
+ Layout/SpaceAroundEqualsInParameterDefault:
146
+ EnforcedStyle: no_space
147
+
148
+ Layout/IndentationConsistency:
149
+ EnforcedStyle: normal
150
+
151
+ Layout/MultilineMethodCallIndentation:
152
+ EnforcedStyle: indented_relative_to_receiver
153
+
154
+ Layout/SpaceAroundMethodCallOperator:
155
+ Enabled: true
156
+
157
+ # Suppressing exceptions can be perfectly fine, and be it to avoid to
158
+ # explicitly type nil into the rescue since that's what you want to return,
159
+ # or suppressing LoadError for optional dependencies
160
+ Lint/SuppressedException:
161
+ Enabled: false
162
+
163
+ Lint/RaiseException:
164
+ Enabled: true
165
+
166
+ Lint/StructNewOverride:
167
+ Enabled: true
168
+
169
+ Lint/MissingSuper:
170
+ Enabled: false
171
+
172
+ Lint/DuplicateBranch:
173
+ Enabled: true
174
+ IgnoreLiteralBranches: true
175
+
176
+ Lint/Debugger:
177
+ Enabled: false
178
+
179
+ # This is just silly. Calling the argument `other` in all cases makes no sense.
180
+ Naming/BinaryOperatorParameterName:
181
+ Enabled: false
182
+
183
+ Naming/MethodParameterName:
184
+ AllowedNames:
185
+ - io
186
+ - id
187
+ - to
188
+ - by
189
+ - on
190
+ - in
191
+ - at
192
+ - ip
193
+ - db
194
+ - x
195
+ - y
196
+ - cc
197
+ - of
198
+
199
+ Naming/VariableNumber:
200
+ Enabled: false
201
+
202
+ Naming/MemoizedInstanceVariableName:
203
+ Enabled: false
204
+
205
+ Naming/BlockForwarding:
206
+ Enabled: true
207
+
208
+ Bundler/OrderedGems:
209
+ Enabled: false
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+
3
+ Gem::Specification.new do |s|
4
+ s.name = "skyltmax_config"
5
+ s.version = "0.0.1"
6
+ s.platform = Gem::Platform::RUBY
7
+ s.required_ruby_version = ">= 3.4.0"
8
+ s.summary = "Skyltmax shared config"
9
+ s.homepage = "https://github.com/skyltmax/config"
10
+ s.authors = ["Skyltmax"]
11
+ s.license = "MIT"
12
+ s.metadata = {
13
+ "homepage_uri" => "https://github.com/skyltmax/config#readme",
14
+ "source_code_uri" => "https://github.com/skyltmax/config",
15
+ "bug_tracker_uri" => "https://github.com/skyltmax/config/issues",
16
+ }
17
+
18
+ # include all tracked files so packaged gem mirrors the repo's config assets
19
+ s.files = Dir.chdir(__dir__) do
20
+ `git ls-files -z`.split("\x0").reject { |path| path.start_with?(".github/") }
21
+ end
22
+ s.require_path = "lib"
23
+
24
+ s.add_dependency "rubocop", ">= 1.81.0", "< 2"
25
+ s.add_dependency "rubocop-performance", ">= 1.26.0", "< 2"
26
+ s.add_dependency "rubocop-rails", ">= 2.33.0", "< 3"
27
+ end
data/tsconfig.json ADDED
@@ -0,0 +1,7 @@
1
+ {
2
+ "extends": "./typescript.json",
3
+ "include": ["**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx"],
4
+ "compilerOptions": {
5
+ "types": ["./reset.d.ts"]
6
+ }
7
+ }
data/typescript.json ADDED
@@ -0,0 +1,24 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/tsconfig",
3
+ "compilerOptions": {
4
+ "jsx": "react-jsx",
5
+ "module": "ESNext",
6
+ "moduleResolution": "Bundler",
7
+ "resolveJsonModule": true,
8
+ "target": "ES2022",
9
+ "strict": true,
10
+ "noImplicitAny": true,
11
+ "noUnusedLocals": true,
12
+ "strictNullChecks": true,
13
+ "verbatimModuleSyntax": true,
14
+ "noImplicitReturns": true,
15
+ "allowImportingTsExtensions": true,
16
+ "noUncheckedIndexedAccess": true,
17
+ "isolatedModules": true,
18
+ "esModuleInterop": true,
19
+ "allowJs": true,
20
+ "skipLibCheck": true,
21
+ "forceConsistentCasingInFileNames": true,
22
+ "noEmit": true
23
+ }
24
+ }
metadata ADDED
@@ -0,0 +1,124 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: skyltmax_config
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Skyltmax
8
+ bindir: bin
9
+ cert_chain: []
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
+ dependencies:
12
+ - !ruby/object:Gem::Dependency
13
+ name: rubocop
14
+ requirement: !ruby/object:Gem::Requirement
15
+ requirements:
16
+ - - ">="
17
+ - !ruby/object:Gem::Version
18
+ version: 1.81.0
19
+ - - "<"
20
+ - !ruby/object:Gem::Version
21
+ version: '2'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ requirements:
26
+ - - ">="
27
+ - !ruby/object:Gem::Version
28
+ version: 1.81.0
29
+ - - "<"
30
+ - !ruby/object:Gem::Version
31
+ version: '2'
32
+ - !ruby/object:Gem::Dependency
33
+ name: rubocop-performance
34
+ requirement: !ruby/object:Gem::Requirement
35
+ requirements:
36
+ - - ">="
37
+ - !ruby/object:Gem::Version
38
+ version: 1.26.0
39
+ - - "<"
40
+ - !ruby/object:Gem::Version
41
+ version: '2'
42
+ type: :runtime
43
+ prerelease: false
44
+ version_requirements: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - ">="
47
+ - !ruby/object:Gem::Version
48
+ version: 1.26.0
49
+ - - "<"
50
+ - !ruby/object:Gem::Version
51
+ version: '2'
52
+ - !ruby/object:Gem::Dependency
53
+ name: rubocop-rails
54
+ requirement: !ruby/object:Gem::Requirement
55
+ requirements:
56
+ - - ">="
57
+ - !ruby/object:Gem::Version
58
+ version: 2.33.0
59
+ - - "<"
60
+ - !ruby/object:Gem::Version
61
+ version: '3'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: 2.33.0
69
+ - - "<"
70
+ - !ruby/object:Gem::Version
71
+ version: '3'
72
+ executables: []
73
+ extensions: []
74
+ extra_rdoc_files: []
75
+ files:
76
+ - ".devcontainer/.bootdone"
77
+ - ".devcontainer/boot.sh"
78
+ - ".devcontainer/devcontainer.json"
79
+ - ".devcontainer/docker-compose.yml"
80
+ - ".gitignore"
81
+ - ".rubocop.yml"
82
+ - CHANGELOG.md
83
+ - Gemfile
84
+ - Gemfile.lock
85
+ - LICENSE
86
+ - README.md
87
+ - eslint.config.js
88
+ - eslint.js
89
+ - index.js
90
+ - lib/skyltmax_config.rb
91
+ - package.json
92
+ - pnpm-lock.yaml
93
+ - prettier.js
94
+ - reset.d.ts
95
+ - rubocop.rails.yml
96
+ - rubocop.yml
97
+ - skyltmax_config.gemspec
98
+ - tsconfig.json
99
+ - typescript.json
100
+ homepage: https://github.com/skyltmax/config
101
+ licenses:
102
+ - MIT
103
+ metadata:
104
+ homepage_uri: https://github.com/skyltmax/config#readme
105
+ source_code_uri: https://github.com/skyltmax/config
106
+ bug_tracker_uri: https://github.com/skyltmax/config/issues
107
+ rdoc_options: []
108
+ require_paths:
109
+ - lib
110
+ required_ruby_version: !ruby/object:Gem::Requirement
111
+ requirements:
112
+ - - ">="
113
+ - !ruby/object:Gem::Version
114
+ version: 3.4.0
115
+ required_rubygems_version: !ruby/object:Gem::Requirement
116
+ requirements:
117
+ - - ">="
118
+ - !ruby/object:Gem::Version
119
+ version: '0'
120
+ requirements: []
121
+ rubygems_version: 3.6.9
122
+ specification_version: 4
123
+ summary: Skyltmax shared config
124
+ test_files: []