Skip to content

Commit

Permalink
Update cookiecutter templates
Browse files Browse the repository at this point in the history
  • Loading branch information
codytodonnell committed Jan 23, 2025
1 parent 772f0bd commit 3c14edd
Show file tree
Hide file tree
Showing 127 changed files with 3,631 additions and 2,340 deletions.
49 changes: 49 additions & 0 deletions strudel-cookiecutter/base/{@cookiecutter.name@}/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.json",
"ecmaVersion": 2020, // Allows for the parsing of modern JS
"ecmaFeatures": {
"jsx": true // Allows for the parsing of JSX
}
},
"ignorePatterns": [
"package-lock.json",
"package.json",
"!.stylelintrc.json",
"*.md",
"*.css",
"dist"
],
"extends": ["airbnb-typescript", "plugin:prettier/recommended"],
"plugins": ["@typescript-eslint", "import", "react", "prettier"],
"rules": {
"@typescript-eslint/no-explicit-any": "off", // allow any because template often can't predict users' types
"import/no-extraneous-dependencies": ["error", { "devDependencies": true }],
"react/no-danger": "off", // it's self explainatory that no-danger should be used sparingly
"react/prop-types": "off", // as long as TS strict mode is off this is not required
"react/function-component-definition": [
2,
{
"namedComponents": "arrow-function",
"unnamedComponents": "arrow-function"
}
],
"react/jsx-props-no-spreading": "off",
"react/react-in-jsx-scope": "off",
"no-console": "error", // no console statements allowed,
"no-plusplus": "off",
"prettier/prettier": "off" // don't show prettier errors as it will be fixed when saved anyway
},
"settings": {
"react": {
"version": "detect"
}
},
"env": {
"node": true,
"browser": true,
"amd": true
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
cd strudel-taskflows
npx lint-staged
3 changes: 3 additions & 0 deletions strudel-cookiecutter/base/{@cookiecutter.name@}/.lintstagedrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"*.{js,jsx,ts,tsx,css,md,mdx}": ["eslint --cache --fix", "prettier --write"]
}
9 changes: 9 additions & 0 deletions strudel-cookiecutter/base/{@cookiecutter.name@}/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"tabWidth": 2,
"useTabs": false,
"printWidth": 80,
"semi": true,
"trailingComma": "es5",
"singleQuote": true,
"endOfLine": "lf"
}
2 changes: 1 addition & 1 deletion strudel-cookiecutter/base/{@cookiecutter.name@}/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ npm start

Open [http://localhost:3000](http://localhost:3000) to view the app in the browser.

Begin modifying the templates in `src/app`.
Begin modifying the templates in `src/pages`.

## Learn More

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import { defineConfig } from "cypress";
import { defineConfig } from 'cypress';

export default defineConfig({
e2e: {
baseUrl: 'http://localhost:5175/',
specPattern: ['cypress/e2e/**/*.cy.{js,jsx,ts,tsx}', 'src/**/*.cy.{js,jsx,ts,tsx}']
specPattern: [
'cypress/e2e/**/*.cy.{js,jsx,ts,tsx}',
'src/**/*.cy.{js,jsx,ts,tsx}',
],
},
});
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ describe('The Home Page', () => {
cy.visit('/');
cy.contains('Registered Pages');
});
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@
// visit(originalFn: CommandOriginalFn, url: string, options: Partial<VisitOptions>): Chainable<Element>
// }
// }
// }
// }
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// ***********************************************************

// Import commands.js using ES2015 syntax:
import './commands'
import './commands';

// Alternatively you can use CommonJS syntax:
// require('./commands')
// require('./commands')
20 changes: 17 additions & 3 deletions strudel-cookiecutter/base/{@cookiecutter.name@}/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,14 @@
"start": "vite",
"dev": "vite",
"build": "tsc && vite build",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview",
"deploy": "gh-pages -d dist -e demo"
"deploy": "gh-pages -d dist -e demo",
"style:all": "tsc && npm run lint && npm run prettier",
"lint": "eslint . '**/*.{js,jsx,ts,tsx}'",
"lint:fix": "eslint . --fix '**/*.{js,jsx,ts,tsx}'",
"prettier": "prettier . --check '**/*.{js,jsx,ts,tsx}'",
"prettier:fix": "prettier . --write '**/*.{js,jsx,ts,tsx}'",
"prepare": "cd ../ && husky ./strudel-taskflows/.husky"
},
"dependencies": {
"@emotion/react": "^11.11.4",
Expand Down Expand Up @@ -41,11 +46,20 @@
"@vitejs/plugin-react": "^4.2.1",
"cypress": "^13.15.0",
"eslint": "^8.57.0",
"eslint-config-airbnb-typescript": "^18.0.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-jsx-a11y": "^6.10.1",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-react": "^7.37.2",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.6",
"gh-pages": "^6.1.1",
"husky": "^9.1.6",
"lint-staged": "^15.2.10",
"prettier": "^3.3.3",
"typescript": "^5.2.2",
"vite": "^5.2.10"
"vite": "^5.4.14"
},
"engines": {
"node": "^18.18.0 || >=20.0.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,15 @@
"citation": "Lindsey, B.D., Johnson, T.D., and Belitz, Kenneth, 2018, Data from Decadal Change in Groundwater Quality Web Site, 1988-2012: U.S. Geological Survey data release, https://doi.org/10.5066/F7PC30WD.",
"doi": "10.5066/F7PC30WD",
"summary": "Groundwater quality data were collected in 5,000 wells between 1988-2001 by the National Water-Quality Assessment Project. About 1,500 of these wells were sampled again between 2002-2012 to evaluate decadal changes in groundwater quality. Monitoring wells, domestic supply wells, and some public supply wells were included in this study.",
"tags": [ "NAWQA", "National Water Quality Program", "USGS Science Data Catalog (SDC)", "Cycle 3", "groundwater quality", "trends", "water quality"],
"tags": [
"NAWQA",
"National Water Quality Program",
"USGS Science Data Catalog (SDC)",
"Cycle 3",
"groundwater quality",
"trends",
"water quality"
],
"category": "Groundwater",
"purpose": "Data were collected as a part of the NAWQA Land use studies or Major aquifer studies. Initially data were collected to characterize the quality of shallow and medium depths of groundwater in the nation. Subsequent samples were collected to evaluate changes in concentrations over a decadal time span. Mapping criteria and benchmarks: The NAWQA Project has developed an interactive mapping tool that displays decadal changes in concentrations.",
"point_of_contact": "Bruce D. Lindsey",
Expand Down Expand Up @@ -41,7 +49,13 @@
"citation": "Labore proident do aute et esse adipisicing veniam eiusmod culpa pariatur sunt officia.",
"doi": "0000000000",
"summary": "Geospatial data were developed to characterize pre-fire biomass, burn severity, and biomass consumed for the Black Dragon Fire that burned in northern China in 1987. Ipsum id laborum et dolor laboris ut sint officia voluptate. Ipsum consectetur fugiat laboris sit Lorem duis minim fugiat.",
"tags": ["Boreal forest", "Carbon and greenhouse gas emissions", "China", "Ecology", "Forestry"],
"tags": [
"Boreal forest",
"Carbon and greenhouse gas emissions",
"China",
"Ecology",
"Forestry"
],
"category": "Fires",
"purpose": "Nostrud ullamco ea id consequat ex. Tempor deserunt laborum amet ex quis culpa laborum Lorem Lorem sunt do sit excepteur. Sunt ea velit non magna ut Lorem magna eu aute aliquip.",
"point_of_contact": "Ernest O. Lawrence",
Expand Down Expand Up @@ -74,7 +88,13 @@
"citation": "Labore proident do aute et esse adipisicing veniam eiusmod culpa pariatur sunt officia.",
"doi": "0000000000",
"summary": "Heavy rainfall occurred across Louisiana, Texas, Arkansas, and Mississippi in March 2016 as a result of a slow-moving southward dip in the jetstream , funneling tropical moisture into Ipsum id laborum et dolor laboris ut sint officia voluptate. Ipsum consectetur fugiat laboris sit Lorem duis minim fugiat.",
"tags": ["Louisiana", "Mississippi", "Texas", "Floods", "USGS Data Catalog (SDC)"],
"tags": [
"Louisiana",
"Mississippi",
"Texas",
"Floods",
"USGS Data Catalog (SDC)"
],
"category": "Floods",
"purpose": "Nostrud ullamco ea id consequat ex. Tempor deserunt laborum amet ex quis culpa laborum Lorem Lorem sunt do sit excepteur. Sunt ea velit non magna ut Lorem magna eu aute aliquip.",
"point_of_contact": "Ernest O. Lawrence",
Expand Down Expand Up @@ -107,7 +127,13 @@
"citation": "Labore proident do aute et esse adipisicing veniam eiusmod culpa pariatur sunt officia.",
"doi": "0000000000",
"summary": "Bathymetric survey data of the Brandon Road Dam spillway was collected on May 27 and May 28, 2015 by the US Geological Survey (USGS) using Trimble Real-Time Kinematic Global Ipsum id laborum et dolor laboris ut sint officia voluptate. Ipsum consectetur fugiat laboris sit Lorem duis minim fugiat.",
"tags": ["Dam", "GPS measurement", "Brandon Road Lock and Dam", "Floods", "USGS Data Catalog (SDC)"],
"tags": [
"Dam",
"GPS measurement",
"Brandon Road Lock and Dam",
"Floods",
"USGS Data Catalog (SDC)"
],
"category": "Groundwater",
"purpose": "Nostrud ullamco ea id consequat ex. Tempor deserunt laborum amet ex quis culpa laborum Lorem Lorem sunt do sit excepteur. Sunt ea velit non magna ut Lorem magna eu aute aliquip.",
"point_of_contact": "Ernest O. Lawrence",
Expand Down Expand Up @@ -140,7 +166,12 @@
"citation": "Labore proident do aute et esse adipisicing veniam eiusmod culpa pariatur sunt officia.",
"doi": "0000000000",
"summary": "This data set presents the results of conducting Mercury Intrusion Porosimetry on core samples of the mudstone underlying the Naval Air Warfare Center, West Trenton, New Jersey Ipsum id laborum et dolor laboris ut sint officia voluptate. Ipsum consectetur fugiat laboris sit Lorem duis minim fugiat.",
"tags": ["Sedimentary rock", "porosity", "West Trenton", "USGS Data Catalog (SDC)"],
"tags": [
"Sedimentary rock",
"porosity",
"West Trenton",
"USGS Data Catalog (SDC)"
],
"category": "Groundwater",
"purpose": "Nostrud ullamco ea id consequat ex. Tempor deserunt laborum amet ex quis culpa laborum Lorem Lorem sunt do sit excepteur. Sunt ea velit non magna ut Lorem magna eu aute aliquip.",
"point_of_contact": "Ernest O. Lawrence",
Expand All @@ -164,4 +195,4 @@
}
]
}
]
]
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,4 @@
"content": "Culpa id officia laborum cupidatat dolor mollit."
}
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@
"upperBound": 1,
"constraints": "value"
}
]
]
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@
"createdDate": "05/23/2023",
"status": "Completed"
}
]
]
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
"name": "Group 2",
"type": "bar"
}
]
]
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
"y": [16, 5, 11, 9],
"type": "scatter"
}
]
]
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@
"upperBound": 1,
"constraints": "value"
}
]
]
Loading

0 comments on commit 3c14edd

Please sign in to comment.