Skip to content

Commit ade7062

Browse files
authored
Merge pull request #117 from netcreateorg/dev
v1.5.0 January 2024 Data Collection
2 parents 5b54d12 + c6ccbd1 commit ade7062

270 files changed

Lines changed: 47960 additions & 38507 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.
File renamed without changes.

.eslintignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# if this doesn't seem to work, try using ignorePatterns in .eslintrc.js
2+
# e.g.
3+
# ignorePatterns: ['**/_dist/*'],
4+
5+

.eslintrc-rules.js

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
/*///////////////////////////////// ABOUT \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*\
2+
3+
These are the specific overrides we use. It's imported in our
4+
.eslintrc.js file
5+
6+
\*\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ * /////////////////////////////////////*/
7+
8+
const LINT_LEVEL = process.env.GS_LINT_LEVEL || 1;
9+
10+
/// RULE OVERRIDES ////////////////////////////////////////////////////////////
11+
/// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
12+
const URSYS_STYLE = {
13+
/* ursys style overrides */
14+
'spaced-comment': 'off',
15+
'camelcase': 'off',
16+
'comma-dangle': ['error', 'never'],
17+
'no-underscore-dangle': 'off',
18+
'lines-between-class-members': 'off',
19+
'no-bitwise': 'off',
20+
'import/prefer-default-export': 'off',
21+
'object-shorthand': 'off'
22+
};
23+
/* allow classroom debugging by researchers */
24+
const CLASSROOM = {
25+
'no-console': 'off',
26+
'no-debugger': 'warn',
27+
'no-alert': 'warn',
28+
'no-restricted-syntax': 'off'
29+
};
30+
/* turn off typescript recommendations */
31+
const HELP_TSJS = {
32+
// 'no-undef': 'off', // TS handles this better; works with global types
33+
'no-unused-vars': 'warn',
34+
'no-shadow': 'off',
35+
'no-param-reassign': 'off',
36+
'object-curly-newline': 'off',
37+
'react/jsx-props-no-spreading': 'off',
38+
'arrow-body-style': 'off',
39+
'no-plusplus': 'off',
40+
'prefer-const': 'off',
41+
'prefer-destructuring': 'off',
42+
'class-methods-use-this': 'off',
43+
'jsx-a11y/label-has-associated-control': 'off'
44+
};
45+
/* disable rules for material-ui sanity */
46+
const YUCK_MUI = {
47+
'react/forbid-prop-types': 'off',
48+
'react/prop-types': 'off'
49+
};
50+
/* disable prettier conflicts manually */
51+
const YUCK_PRETTIER = {
52+
'arrow-parens': 'off'
53+
};
54+
/* these are our specific overrides of the recommended rules */
55+
const RULES = {
56+
...URSYS_STYLE,
57+
...CLASSROOM,
58+
...HELP_TSJS,
59+
...YUCK_MUI,
60+
...YUCK_PRETTIER
61+
};
62+
63+
/// EXPORTS ///////////////////////////////////////////////////////////////////
64+
/// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
65+
module.exports = {
66+
RULES
67+
};

.eslintrc.js

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
/*///////////////////////////////// ABOUT \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*\
2+
3+
ESLINT CONFIGURATION for NETCREATE ITEST (2023)
4+
5+
\*\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ * /////////////////////////////////////*/
6+
7+
const { RULES } = require('./.eslintrc-rules');
8+
9+
/// BASE CONFIGURATION ////////////////////////////////////////////////////////
10+
/// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
11+
const config = {
12+
/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*:
13+
We want to support both node-style 'require' and es6 module 'import'.
14+
:*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
15+
env: {
16+
browser: true,
17+
es6: true,
18+
node: true
19+
},
20+
plugins: ['react', '@typescript-eslint', 'import'],
21+
/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*:
22+
Important: We use the official typescript-eslint/parser instead of the
23+
default espree parser. This supercedes TSLINT as of 2019, and is supported
24+
both by the Microsoft and ESLint teams.
25+
26+
The typescript parser handles the typescript superset syntax and creates a
27+
compatible AST for ESLINT.
28+
:*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
29+
parser: '@typescript-eslint/parser',
30+
ignorePatterns: ['**/_dist/*', '**/node_modules/*'],
31+
parserOptions: {
32+
'ecmaVersion': 2022,
33+
'sourceType': 'module'
34+
},
35+
/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*:
36+
Plugins are packages that rules and sets of rules, but could also be
37+
something else (e.g. parser) that ESLINT can make use of.
38+
See: eslint.org/docs/user-guide/configuring#use-a-plugin
39+
:*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
40+
extends: [
41+
'eslint:recommended', // standard recommendations
42+
'plugin:react/recommended', // handle jsx syntax
43+
'plugin:@typescript-eslint/eslint-recommended', // basic typescript rules
44+
'prettier' // prettier overrides
45+
],
46+
globals: {
47+
Atomics: 'readonly',
48+
SharedArrayBuffer: 'readonly'
49+
},
50+
settings: {
51+
'react': {
52+
'version': 'detect'
53+
}
54+
},
55+
/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*:
56+
The "rules" field can override what was set in the "extends" field.
57+
I am turning off the rules that I find annoying or trigger false warnings
58+
in some code structures.
59+
:*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
60+
rules: RULES
61+
};
62+
63+
/// EXPORTS ///////////////////////////////////////////////////////////////////
64+
/// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
65+
module.exports = config;

.gitignore

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,34 +5,42 @@
55
# or operating system, you probably want to add a global ignore instead:
66
# git config --global core.excludesfile ~/.gitignore
77

8-
# Ignore npm packaging
9-
/.node_modules
10-
/node_modules
8+
# NetCreate ignored directories
9+
/runtime
10+
netcreate-config.js
1111

12-
# Ignore all logfiles and tempfiles.
12+
# _ur package
13+
_dist
14+
15+
# Also ignore build system directories
16+
.npmignore
17+
/.parcel-cache
18+
/public*
19+
20+
# the code-workspace file also hides node_modules from file list
21+
**/node_modules
22+
.package-lock.json
23+
24+
# And don't commit personal log files or temp
25+
*_log.md
1326
*.log
14-
/tmp
27+
tmp-*
28+
*_nocommit
29+
30+
# And don't commit .zip archives either
31+
*.zip
1532

1633
# Ignore all generated files
1734
npm-debug.log
1835
*.tmproj
1936

20-
# Ignore generated files in output folder
21-
/public
22-
2337
# Numerous always-ignore extensions
2438
*~
2539
*.diff
2640
*.patch
2741
*.err
2842
*.orig
2943
*.log
30-
*.rej
31-
*.swo
32-
*.swp
33-
*.vi
34-
*~
35-
*.sass-cache
3644

3745
# Ignore OS or Editor folders
3846
.DS_Store
@@ -42,10 +50,3 @@ npm-debug.log
4250
.tmproj
4351
nbproject
4452
Thumbs.db
45-
46-
# Ignore Sublime Text saved projects/workspaces
47-
*.sublime-workspace
48-
*.sublime-project
49-
50-
# Ignore JetBrains' IDEs
51-
.idea

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v18.18.2

.prettierignore

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

.prettierrc.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/// PRETTIER //////////////////////////////////////////////////////////////////
2+
/*/- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\*\
3+
Handles formatting on save to enforce code style. Works in conjunction with
4+
ESLINT, which has to have its format-related rules disabled to not conflict
5+
with Prettier.
6+
7+
\*\- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /*/
8+
9+
module.exports = {
10+
semi: true,
11+
printWidth: 86,
12+
singleQuote: true,
13+
quoteProps: 'preserve',
14+
arrowParens: 'avoid',
15+
trailingComma: 'none'
16+
};

.vscode/check_env

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# The following script is invoked on Apple OSX machines
2+
# in the .code-workspace setting "terminal.integrated.profiles.osx"
3+
4+
#
5+
# (1) Ensure NVM Version is Obeyed in Shell
6+
#
7+
NODE_PREFERRED="v18.16.0"
8+
9+
# ANSI Terminal Colors
10+
ALRT="\e[33;1m" # yellow
11+
INFO="\e[34;1m" # blue
12+
NRML="\e[0m" # normal
13+
BOLD="\e[1m" # normal bold
14+
15+
# Check if NVM_DIR is defined
16+
if [ -z "$NVM_DIR" ]; then
17+
echo ""
18+
echo "vsenv: ${ALRT}NVM does not appear to be installed${NRML}"
19+
echo " Does your ${INFO}~/.zshrc${NRML} have ${INFO}export NVM_DIR${NRML} lines?"
20+
echo ""
21+
echo " If you haven't installed nvm yet, please follow the instructions"
22+
echo " on the NetCreate wiki."
23+
echo " If you are using 'bash' as your default shell, you can copy "
24+
echo " these lines to your .zshrc file so nvm will also work in zsh."
25+
return
26+
fi
27+
28+
29+
# Check if shell is opening inside a VSCODE integrated terminal
30+
# is NVM is installed, there is a .nvmrc file and a .vscode directory?
31+
if [ -n "$NVM_DIR" ] && [ -s "./.nvmrc" ] && [ -d "./.vscode" ]; then
32+
NODE_VERSION=$(cat ./.nvmrc)
33+
str_out="(nvm)";
34+
str_alias=$(nvm alias default "$NODE_VERSION")
35+
str_use=$(nvm use "$NODE_VERSION")
36+
if [ -n "$str_use" ]; then
37+
str_out="$str_out current version"
38+
fi
39+
if [ -n "$str_alias" ]; then
40+
str_out="$str_out and alias"
41+
fi
42+
echo ""
43+
echo "vsenv: VISUAL STUDIO CODE INTEGRATED TERMINAL DETECTED"
44+
echo " ${str_out} detected setting: node ${INFO}$NODE_VERSION${NRML}"
45+
CURRENT_VERSION=$(node --version)
46+
if [ "$CURRENT_VERSION" != "$NODE_VERSION" ] && [ -n "$str_alias" ]; then
47+
echo "vsenv: ${BOLD}kill/restart VSCODE for nvm alias default to take effect!${NRML}"
48+
echo " this shell is using version ${INFO}$CURRENT_VERSION${NRML} until you do"
49+
echo " alternatively, type ${ALRT}nvm use $NODE_VERSION${NRML} to use it now"
50+
fi
51+
else
52+
nvm use $NODE_PREFERRED > /dev/null 2>&1
53+
nvm alias default $NODE_PREFERRED > /dev/null 2>&1
54+
echo "zshrc: setting default node $NODE_PREFERRED"
55+
fi

.vscode/extensions.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
// See http://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
3+
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp
4+
5+
// List of extensions which should be recommended for users of this workspace.
6+
"recommendations": [
7+
"editorconfig.editorconfig",
8+
"dbaeumer.vscode-eslint",
9+
"ms-vsliveshare.vsliveshare",
10+
"esbenp.prettier-vscode",
11+
"stkb.rewrap"
12+
],
13+
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
14+
"unwantedRecommendations": [
15+
"hookyqr.beautify",
16+
"dbaeumer.jshint"
17+
]
18+
}

0 commit comments

Comments
 (0)