mentie 0.0.8 → 0.0.10

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.
package/README.md CHANGED
@@ -1,46 +1,3 @@
1
- # Opinionated ESLint and VSCode style guide
1
+ # Mentie
2
2
 
3
- A shared set of standards and preferences, enforced through eslint and vscode. Priorities: minimalism, readability, documentation.
4
-
5
- ## Quickstart
6
-
7
- ```shell
8
- # Install dependencies
9
- npm install -D airier @babel/eslint-parser @babel/preset-react eslint eslint-plugin-react eslint-plugin-unused-imports husky
10
- mkdir .vscode .husky || echo "Directories already exist"
11
-
12
- # Create scripts
13
- npm pkg set scripts.lint="eslint --fix src"
14
-
15
- # Init husky
16
- npx husky init
17
-
18
- # Download files
19
- curl https://raw.githubusercontent.com/actuallymentor/airier/main/.eslintrc.cjs --output .eslintrc.cjs
20
- curl https://raw.githubusercontent.com/actuallymentor/airier/main/.vscode/settings.json --output .vscode/settings.json
21
- curl https://raw.githubusercontent.com/actuallymentor/airier/main/.husky/pre-commit --output .husky/pre-commit
22
- curl https://raw.githubusercontent.com/actuallymentor/airier/main/.babelrc --output .babelrc
23
-
24
- # Add files to git
25
- git add -f .eslintrc.cjs .babelrc .vscode/* .husky/*
26
-
27
- # Make husky executable
28
- chmod ug+x .husky/*
29
- git add .husky/pre-commit
30
- ```
31
-
32
- ## Making changes
33
-
34
- The relevant source files are in `modules/`. If you make a change, you can update the package by:
35
-
36
- 1. Making the changes
37
- 1. Updating the version number in `package.json`
38
- 1. Pushing to the main branch of the repo or opening a pull request. Changes are deployed and published through github actions. Publishing requires a version bump in `package.json`.
39
-
40
- ### Using this repo as a template
41
-
42
- If you are cloning this repo and want to reuse it to create an npm package. These are the one-time setup instructions:
43
-
44
- 1. You need to do the one-time first publishing manually by running `npm publish --access public` in the root of the project. This will create the package on npmjs and allow you to create a granular token. This requires you to rename `.npmrc` to `.npmrc.bak` temporatily.
45
- 1. You need to obtain a NPM_ACCESS_TOKEN on npmjs (https://www.npmjs.com/settings/YOURUSERNAME/tokens/granular-access-tokens/new). Note that granular tokens expire!
46
- # airier
3
+ Mentor's favorite helpers.
@@ -24,7 +24,7 @@ export const is_emulator = process.env.FUNCTIONS_EMULATOR === 'true'
24
24
  // ///////////////////////////////
25
25
 
26
26
  const node_dev = process.env.NODE_ENV === 'development'
27
- const web_dev = typeof location !== 'undefined' && ( `${ location.href }`.includes( 'debug=true' ) || `${ location.href }`.includes( 'debug=true' ) )
27
+ const web_dev = typeof location !== 'undefined' && ( `${ location.href }`.includes( 'debug=true' ) || `${ location.href }`.includes( 'localhost' ) )
28
28
 
29
29
  /**
30
30
  * Represents the development environment.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mentie",
3
- "version": "0.0.8",
3
+ "version": "0.0.10",
4
4
  "description": "Mentor's toolbelt",
5
5
  "type": "module",
6
6
  "main": "index.js",
package/.eslintrc.cjs DELETED
@@ -1,7 +0,0 @@
1
- // const { eslint_config } = require( './index.cjs' )
2
- const { eslint_config } = require( 'airier' )
3
-
4
- // Export the default eslint config
5
- module.exports = {
6
- ...eslint_config
7
- }
package/.husky/pre-commit DELETED
@@ -1,17 +0,0 @@
1
- echo "\nšŸ¤– [ precommit hook ] linting before committing..."
2
-
3
- # If errors, make it clear they cannot commit
4
- if ! lint_outcome=$(npm run lint); then
5
- echo "🚨 [ precommit hook ] lint encountered blocking issues, fix them before committing\n"
6
- echo "$lint_outcome"
7
- exit 1
8
- fi
9
-
10
- # If warnings, suggest they fix them
11
- if echo $lint_outcome | grep -q "warning"; then
12
- echo "āš ļø [ precommit hook ] lint encountered warnings, consider fixing them before pushing\n"
13
- echo "$lint_outcome"
14
- exit 0
15
- fi
16
-
17
- echo "āœ… [ precommit hook ] lint encountered no blocking issues\n"
package/.npmrc.bak DELETED
@@ -1 +0,0 @@
1
- //registry.npmjs.org/:_authToken=${NPM_ACCESS_TOKEN}
@@ -1,27 +0,0 @@
1
- {
2
- "i18n-ally.localesPaths": [
3
- "public/locales"
4
- ],
5
- "i18n-ally.keystyle": "nested",
6
- "eslint.validate": [
7
- "javascript",
8
- "javascriptreact",
9
- "typescript",
10
- "typescriptreact"
11
- ],
12
- "editor.codeActionsOnSave": {
13
- "source.fixAll.eslint": "explicit"
14
- },
15
- "editor.renderWhitespace": "all",
16
- "editor.formatOnSave": true,
17
- "eslint.format.enable": true,
18
- "eslint.run": "onType",
19
- "explorer.fileNesting.enabled": true,
20
- "explorer.fileNesting.patterns": {
21
- "vite.config.js": "*.js,.babelrc,.nvmrc,index.html,.gitignore",
22
- ".env": ".env*,.*.json",
23
- "firebase.json": "fire*,.fire*",
24
- "package.json": "package-lock.json, yarn.lock, pnpm-lock.yaml,.eslint*,config.*,.npm*,.nvm*,.ncu*",
25
- "README.md": "*.md,LICENSE",
26
- }
27
- }