canvas-lms/tsconfig.json

19 lines
1.2 KiB
JSON
Raw Normal View History

{
"compilerOptions": {
"allowJs": true, // allows importing of .js files from .ts files
"esModuleInterop": true, // more accurately transpiles to the ES6 module spec (maybe not needed w/ babel transpilation)
"isolatedModules": true, // required to adhere to babel's single-file transpilation process
"jsx": "react", // transpiles jsx to React.createElement calls (maybe not needed w/ babel transpilation)
Initial pace plans import This change brings in the basic pace plans frontend with styled-components and several other smaller libraries replaced with InstUI 7 components. It also adds the 'reselect' library as a direct dependency (which we already had through @instructure/outcomes-ui) and 'tsc-files' for type-checking of staged TS files on commit. There were also some tweaks to typescript and eslint configs, mostly to get both up to speed with the typescript code. Finally, this also adds a `pace_plans` endpoint to `courses_controller` to bootstrap the frontend-- this will get moved to `pace_plans_controller` once it has been merged. It's also worth noting that no frontend tests are included with this change-- the existing tests were written with enzyme and are heavily snapshot-based, so we will be replacing those with @testing-library/react tests in later updates (in keeping with current testing best practices at Instructure). closes LS-2431, LS-2432, LS-2433, LS-2434, LS-2452 flag = pace_plans Test plan: - Set up a course with at least one module and several module items - Turn on the pace_plans feature flag in the account associated with that course - Turn on the "Enable pace plans" setting in course settings - Create a pace plan for the course via the Rails console: c = Course.find<id> pp = c.pace_plans.create! workflow_state: 'active' c.context_module_tags.each_with_index do |t, i| pp.pace_plan_module_items.create! module_item: t, duration: i*2 end - Go to the course as a teacher or admin - Expect to see a "Pace Plans" link in the course navigation - Click it, expect the pace plan you created earlier to load and render - Expect to be able to pick dates, change durations, and toggle checkboxes (although saves will fail, since there is no API yet). - Expect to not see the "Pace Plans" course nav link when the feature flag or course setting is off - Expect /courses/<id>/pace_plans to return a 404 when the feature flag or course setting is off - Expect to not see the "Pace Plans" course nav link as a student - Expect /courses/<id>/pace_plans to display an "Unauthorized" page as a student Change-Id: If4dc5d17f2c6a2109d4b4cb652c9e9ef00d7cc33 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/271650 Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> Reviewed-by: Ed Schiebel <eschiebel@instructure.com> QA-Review: Ed Schiebel <eschiebel@instructure.com> Product-Review: Jeff Largent <jeff.largent@instructure.com>
2021-08-18 05:14:24 +08:00
"lib": ["dom", "es7"], // include types for DOM APIs and standard JS up to ES2016 / ES7
"module": "ES2020", // support the most modern ES6-style module syntax
"moduleResolution": "node", // required for non-commonjs imports
Initial pace plans import This change brings in the basic pace plans frontend with styled-components and several other smaller libraries replaced with InstUI 7 components. It also adds the 'reselect' library as a direct dependency (which we already had through @instructure/outcomes-ui) and 'tsc-files' for type-checking of staged TS files on commit. There were also some tweaks to typescript and eslint configs, mostly to get both up to speed with the typescript code. Finally, this also adds a `pace_plans` endpoint to `courses_controller` to bootstrap the frontend-- this will get moved to `pace_plans_controller` once it has been merged. It's also worth noting that no frontend tests are included with this change-- the existing tests were written with enzyme and are heavily snapshot-based, so we will be replacing those with @testing-library/react tests in later updates (in keeping with current testing best practices at Instructure). closes LS-2431, LS-2432, LS-2433, LS-2434, LS-2452 flag = pace_plans Test plan: - Set up a course with at least one module and several module items - Turn on the pace_plans feature flag in the account associated with that course - Turn on the "Enable pace plans" setting in course settings - Create a pace plan for the course via the Rails console: c = Course.find<id> pp = c.pace_plans.create! workflow_state: 'active' c.context_module_tags.each_with_index do |t, i| pp.pace_plan_module_items.create! module_item: t, duration: i*2 end - Go to the course as a teacher or admin - Expect to see a "Pace Plans" link in the course navigation - Click it, expect the pace plan you created earlier to load and render - Expect to be able to pick dates, change durations, and toggle checkboxes (although saves will fail, since there is no API yet). - Expect to not see the "Pace Plans" course nav link when the feature flag or course setting is off - Expect /courses/<id>/pace_plans to return a 404 when the feature flag or course setting is off - Expect to not see the "Pace Plans" course nav link as a student - Expect /courses/<id>/pace_plans to display an "Unauthorized" page as a student Change-Id: If4dc5d17f2c6a2109d4b4cb652c9e9ef00d7cc33 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/271650 Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> Reviewed-by: Ed Schiebel <eschiebel@instructure.com> QA-Review: Ed Schiebel <eschiebel@instructure.com> Product-Review: Jeff Largent <jeff.largent@instructure.com>
2021-08-18 05:14:24 +08:00
"noEmit": true, // don't generate transpiled JS files, source-maps, or .d.ts files for Canvas source code
"resolveJsonModule": true, // enables importing json files
Initial pace plans import This change brings in the basic pace plans frontend with styled-components and several other smaller libraries replaced with InstUI 7 components. It also adds the 'reselect' library as a direct dependency (which we already had through @instructure/outcomes-ui) and 'tsc-files' for type-checking of staged TS files on commit. There were also some tweaks to typescript and eslint configs, mostly to get both up to speed with the typescript code. Finally, this also adds a `pace_plans` endpoint to `courses_controller` to bootstrap the frontend-- this will get moved to `pace_plans_controller` once it has been merged. It's also worth noting that no frontend tests are included with this change-- the existing tests were written with enzyme and are heavily snapshot-based, so we will be replacing those with @testing-library/react tests in later updates (in keeping with current testing best practices at Instructure). closes LS-2431, LS-2432, LS-2433, LS-2434, LS-2452 flag = pace_plans Test plan: - Set up a course with at least one module and several module items - Turn on the pace_plans feature flag in the account associated with that course - Turn on the "Enable pace plans" setting in course settings - Create a pace plan for the course via the Rails console: c = Course.find<id> pp = c.pace_plans.create! workflow_state: 'active' c.context_module_tags.each_with_index do |t, i| pp.pace_plan_module_items.create! module_item: t, duration: i*2 end - Go to the course as a teacher or admin - Expect to see a "Pace Plans" link in the course navigation - Click it, expect the pace plan you created earlier to load and render - Expect to be able to pick dates, change durations, and toggle checkboxes (although saves will fail, since there is no API yet). - Expect to not see the "Pace Plans" course nav link when the feature flag or course setting is off - Expect /courses/<id>/pace_plans to return a 404 when the feature flag or course setting is off - Expect to not see the "Pace Plans" course nav link as a student - Expect /courses/<id>/pace_plans to display an "Unauthorized" page as a student Change-Id: If4dc5d17f2c6a2109d4b4cb652c9e9ef00d7cc33 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/271650 Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> Reviewed-by: Ed Schiebel <eschiebel@instructure.com> QA-Review: Ed Schiebel <eschiebel@instructure.com> Product-Review: Jeff Largent <jeff.largent@instructure.com>
2021-08-18 05:14:24 +08:00
"skipLibCheck": true, // don't do type-checking on dependencies' internal types for improved performance
"strict": true, // enables a bunch of strict mode family options. See https://www.typescriptlang.org/tsconfig#strict
Initial pace plans import This change brings in the basic pace plans frontend with styled-components and several other smaller libraries replaced with InstUI 7 components. It also adds the 'reselect' library as a direct dependency (which we already had through @instructure/outcomes-ui) and 'tsc-files' for type-checking of staged TS files on commit. There were also some tweaks to typescript and eslint configs, mostly to get both up to speed with the typescript code. Finally, this also adds a `pace_plans` endpoint to `courses_controller` to bootstrap the frontend-- this will get moved to `pace_plans_controller` once it has been merged. It's also worth noting that no frontend tests are included with this change-- the existing tests were written with enzyme and are heavily snapshot-based, so we will be replacing those with @testing-library/react tests in later updates (in keeping with current testing best practices at Instructure). closes LS-2431, LS-2432, LS-2433, LS-2434, LS-2452 flag = pace_plans Test plan: - Set up a course with at least one module and several module items - Turn on the pace_plans feature flag in the account associated with that course - Turn on the "Enable pace plans" setting in course settings - Create a pace plan for the course via the Rails console: c = Course.find<id> pp = c.pace_plans.create! workflow_state: 'active' c.context_module_tags.each_with_index do |t, i| pp.pace_plan_module_items.create! module_item: t, duration: i*2 end - Go to the course as a teacher or admin - Expect to see a "Pace Plans" link in the course navigation - Click it, expect the pace plan you created earlier to load and render - Expect to be able to pick dates, change durations, and toggle checkboxes (although saves will fail, since there is no API yet). - Expect to not see the "Pace Plans" course nav link when the feature flag or course setting is off - Expect /courses/<id>/pace_plans to return a 404 when the feature flag or course setting is off - Expect to not see the "Pace Plans" course nav link as a student - Expect /courses/<id>/pace_plans to display an "Unauthorized" page as a student Change-Id: If4dc5d17f2c6a2109d4b4cb652c9e9ef00d7cc33 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/271650 Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> Reviewed-by: Ed Schiebel <eschiebel@instructure.com> QA-Review: Ed Schiebel <eschiebel@instructure.com> Product-Review: Jeff Largent <jeff.largent@instructure.com>
2021-08-18 05:14:24 +08:00
"target": "ES2020", // support the most modern JS features (let babel handle transpilation)
"noImplicitAny": false // remove once fixed in pace plans
},
"include": ["ui/**/*"]
}