Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .husky/pre-commit

This file was deleted.

35 changes: 35 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import prettier from "eslint-plugin-prettier";
import globals from "globals";
import path from "node:path";
import { fileURLToPath } from "node:url";
import js from "@eslint/js";
import { FlatCompat } from "@eslint/eslintrc";

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
});

export default [...compat.extends("standard", "prettier"), {
plugins: {
prettier,
},

languageOptions: {
globals: {
...globals.commonjs,
...globals.node,
...globals.jasmine,
},

ecmaVersion: 12,
sourceType: "commonjs",
},

rules: {
"prettier/prettier": ["error"],
},
}];
3 changes: 3 additions & 0 deletions src/advanced/strings-adv.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
/* eslint-disable no-unused-vars */
const city = 'New York'
/* eslint-disable no-unused-vars */
const cityStr = 'City'
/* eslint-disable no-unused-vars */
const shoppingList = 'apples, bananas, oranges, grapes'

// TODO get the INDEX of the character where 'York' word is found in the city variable
Expand Down
12 changes: 6 additions & 6 deletions src/numbers.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,22 @@ const numThree = 32
// NOT myAnswer = 336

// 1. Set this variable to numOne added to numTwo
const numOnePlusNumTwo = NaN
const numOnePlusNumTwo = numOne + numTwo

// 2. Set this variable to numThree multiplied by numTwo
const numThreeTimesNumTwo = NaN
const numThreeTimesNumTwo = numThree * numTwo

// 3. Set this variable to numThree divided by numOne
const numThreeDividedByNumOne = NaN
const numThreeDividedByNumOne = numThree / numOne

// 4. Set this variable to numThree minus numOne
const numThreeMinusNumOne = NaN
const numThreeMinusNumOne = numThree - numOne

// 5. Set this variable to the sum of numOne, numTwo and numThree
const sum = NaN
const sum = numOne + numTwo + numThree

// 6. Set this variable to the sum of (numOne, numTwo, numThree) divided by numOne
const numBytes = NaN
const numBytes = (numOne + numTwo + numThree) / numOne

// do not edit the exported object.
module.exports = {
Expand Down
8 changes: 4 additions & 4 deletions src/strings.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ const secondName = 'Smith'
// NOT twoJanes = "JaneJane"

// 1. Set this variable to firstName and secondName concatenated
const fullName = null
const fullName = firstName + ' ' + secondName

// 2. Set this variable to the 10th character of the alphabet variable
const tenthCharacterOfAlphabet = null
const tenthCharacterOfAlphabet = alphabet.charAt(9)

// 3. Set this variable by calling a method on the alphabet variable to transform it to lower case
const lowerCaseAlphabet = null
const lowerCaseAlphabet = alphabet.toLowerCase()

// 4. Set this variable by using a property on the alphabet variable to get it's length
const numberOfLettersInAlphabet = null
const numberOfLettersInAlphabet = alphabet.length

// do not edit the exported object.
module.exports = {
Expand Down