foobara-empty-typescript-react-project-generator 0.0.2 → 0.0.4

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 739e95bb903279fb89fdeda1c8605a8adbcd24471c4d1ba5dc2e5b0f23d968b5
4
- data.tar.gz: 69be9fbca9c0e4da1d8efc5d8d8b8a9b62e1077b608327b45e60342112922c2f
3
+ metadata.gz: 7d2de82e547950b5f6874b942d5e53ed8c5ea7a7ae23dac3939f9ff6d4c30e9f
4
+ data.tar.gz: a790d1445df69542e132d3004cfc237287847e9a278934ec1da62ef8b0b8fe3f
5
5
  SHA512:
6
- metadata.gz: 22abfd0f96fb8a3f625f6d4d6cfeef0dc9f42d28f24ae23130574054ba829847fa5e2b1e36a13a450114999252f353359840eff35f9fef6de8e4c8df6d004e9c
7
- data.tar.gz: 480c41ab898cd9542d6d139157c763ca46939e21c4742c9b4f7648ab7e40d8144b5b9d88097d84c076012e81a732a088868848dda259db8026028363a644dc3a
6
+ metadata.gz: '085b1c412cbc858788160b949916a2d9fc73d15153baa81c20c5bebc155a23306835fb75985ff63d91f466c4b5172d6ff2d9428906858fe1147b85f16c4fa38f'
7
+ data.tar.gz: 4c16639faf6219c17b2527f7039e4253af2f2286924cb5bbac15cac36186cc9780cf9fecb15026d81fab64972d6e756a38dfe94eed1ede24893ee8022b13f416
data/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ ## [0.0.4] - 2025-01-07
2
+
3
+ - Fix bug caused by uncorrectable lint violation in generated project
4
+ - Bump Ruby to 3.4.1
5
+
6
+ ## [0.0.3] - 2024-06-21
7
+
8
+ - Include hidden template files/directories in gem
9
+
1
10
  ## [0.0.2] - 2024-06-21
2
11
 
3
12
  - Include templates in gem
@@ -52,6 +52,7 @@ module Foobara
52
52
  def run_pre_generation_tasks
53
53
  run_npx_create_react_app
54
54
  add_necessary_dev_dependencies_for_eslint
55
+ fix_uncorrectable_lint_violations
55
56
  eslint_fix
56
57
  git_init
57
58
  git_add_all
@@ -96,6 +97,14 @@ module Foobara
96
97
  push_to_github
97
98
  end
98
99
 
100
+ def fix_uncorrectable_lint_violations
101
+ Dir.chdir(project_directory) do
102
+ web_vitals_contents = File.read("src/reportWebVitals.ts")
103
+ web_vitals_contents.gsub!("if (onPerfEntry && ", "if (onPerfEntry != null && ")
104
+ File.write("src/reportWebVitals.ts", web_vitals_contents)
105
+ end
106
+ end
107
+
99
108
  def eslint_fix
100
109
  puts "linting..."
101
110
 
data/templates/.env ADDED
@@ -0,0 +1 @@
1
+ REACT_APP_FOOBARA_GLOBAL_URL_BASE=http://localhost:9292
@@ -0,0 +1,45 @@
1
+ module.exports = {
2
+ "env": {
3
+ "browser": true,
4
+ "es2021": true
5
+ },
6
+ "extends": [
7
+ "standard-with-typescript",
8
+ "plugin:react/recommended"
9
+ ],
10
+ "overrides": [
11
+ {
12
+ "env": {
13
+ "node": true
14
+ },
15
+ "files": [
16
+ ".eslintrc.{js,cjs}"
17
+ ],
18
+ "parserOptions": {
19
+ "sourceType": "script"
20
+ }
21
+ }
22
+ ],
23
+ parser: '@typescript-eslint/parser',
24
+ "parserOptions": {
25
+ "ecmaVersion": "latest",
26
+ project: ['./tsconfig.json'],
27
+ "sourceType": "module"
28
+ },
29
+ "plugins": [
30
+ "react"
31
+ ],
32
+ settings: {
33
+ react: {
34
+ version: "detect"
35
+ },
36
+ },
37
+ "rules": {
38
+ "@typescript-eslint/explicit-function-return-type": "off",
39
+ "@typescript-eslint/triple-slash-reference": "off",
40
+ "@typescript-eslint/explicit-function-return-type": "off",
41
+ "@typescript-eslint/no-floating-promises": "off",
42
+ "react/jsx-indent" : ["error", 2],
43
+ "react/jsx-indent-props": ["error", 2]
44
+ }
45
+ }
@@ -0,0 +1,18 @@
1
+ name: tests
2
+ on: push
3
+ jobs:
4
+ tests:
5
+ runs-on: ubuntu-latest
6
+ name: run test suite
7
+ steps:
8
+ - uses: actions/checkout@v2
9
+ - name: Use Node.js
10
+ if: always()
11
+ uses: actions/setup-node@v2
12
+ with:
13
+ # how to grab this from .nvmrc??
14
+ node-version: "20.9"
15
+ - name: Install dependencies
16
+ run: npm install
17
+ - name: Run test
18
+ run: npm run test
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foobara-empty-typescript-react-project-generator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miles Georgi
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-06-22 00:00:00.000000000 Z
10
+ date: 2025-01-07 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: foobara
@@ -38,7 +37,6 @@ dependencies:
38
37
  - - ">="
39
38
  - !ruby/object:Gem::Version
40
39
  version: '0'
41
- description:
42
40
  email:
43
41
  - azimux@gmail.com
44
42
  executables: []
@@ -55,6 +53,9 @@ files:
55
53
  - src/empty_typescript_react_project_generator.rb
56
54
  - src/generate_empty_typescript_react_project.rb
57
55
  - src/write_empty_typescript_react_project_to_disk.rb
56
+ - templates/.env
57
+ - templates/.eslintrc.js
58
+ - templates/.github/workflows/tests.yml
58
59
  - templates/tsconfig.json
59
60
  homepage: https://github.com/foobara/generators-empty-typescript-react-project-generator
60
61
  licenses:
@@ -65,7 +66,6 @@ metadata:
65
66
  source_code_uri: https://github.com/foobara/generators-empty-typescript-react-project-generator
66
67
  changelog_uri: https://github.com/foobara/generators-empty-typescript-react-project-generator/blob/main/CHANGELOG.md
67
68
  rubygems_mfa_required: 'true'
68
- post_install_message:
69
69
  rdoc_options: []
70
70
  require_paths:
71
71
  - lib
@@ -73,15 +73,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
73
73
  requirements:
74
74
  - - ">="
75
75
  - !ruby/object:Gem::Version
76
- version: 3.2.2
76
+ version: 3.4.0
77
77
  required_rubygems_version: !ruby/object:Gem::Requirement
78
78
  requirements:
79
79
  - - ">="
80
80
  - !ruby/object:Gem::Version
81
81
  version: '0'
82
82
  requirements: []
83
- rubygems_version: 3.4.10
84
- signing_key:
83
+ rubygems_version: 3.6.2
85
84
  specification_version: 4
86
85
  summary: Generates empty typescript react projects
87
86
  test_files: []